-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signout does not complete when closing the browser without action #2598
Comments
Thanks for the report @niihofutoshi. We'll take a look at this. |
@niihofutoshi It looks like you are right here and there is a missing case to fix, however we would also not expect this to be a common occurrence as the browser should very quickly redirect back and close itself after signing out. We can look into fixing this but I also want to check whether you are seeing the browser staying open during a sign out? |
@mattcreaser Thank you for your reply! |
Thanks for the confirmation. We'll try to get a fix made for this issue soon. |
I'm going to relabel this as a feature request, but after looking at this a bit more, this is working as intended. v2 requires the redirect to complete before continuing with the sign out. If the user does not have a network connection, we can't actually sign the user out of the Cognito browser session. When the user clicks the back button, there would be no way to distinguish between a user attempting to quickly cancel a sign out request, or an indication that the sign out should proceed. This would likely require a sign out option to override user cancellation and instead continue with sign out. |
Hello, I also get this issue, I use amplify version |
@tylerjroach Is this feature request in your roadmap? Is there an ETA ? I have a use case in my app where the user needs to be able to sign out from the app even if they are offline. |
In attempting to figure out a workaround to allow sign out in no network conditions(such as manually clearing shared preferences file), I discovered the original report does contain a valid bug. This is not just a feature request. I have observed that the onComplete callback does not fire at all (as reported), leaving auth in an invalid state where no other actions are completed. We will begin working on a fix to return a failed sign out in the onComplete callback, ensuring future auth calls proceed successfully. @niihofutoshi I'm sorry for the wrong original diagnosis. Thank you for the report. |
Hi, I also got this issue, I use the latest amplify 2.18.0.
Hope you could also clarify this issue. Thanks a lot. |
Hi @lokeshbhattarai, @fauzimubarokk, @niihofutoshi please try the Amplify Android 2.18.0 update. You should observe the cancellation as a FailedSignOut in the @ScottLu77 The issue you are referring to is that when you sign out, the redirect isn't directing back into the app. Clicking back should result in a cancellation which will returend a failed sign out in onComplete block. Are you saying that in your case you still aren't seeing any callbacks in |
Hi tyler, in my case, I must manually close the popup WebView, and it will receive sign out fail callback as follows signOutResult: FailedSignOut(exception=UserCancelledException{message=The user cancelled the sign-out attempt, so it did not complete., cause=null, recoverySuggestion=To recover: catch this error, and attempt the sign out again.}) |
@ScottLu77 That is working as expected. The issue in your case is that Cognito/SAML provider is not providing the redirect back into the application. This appears to be a configuration issue on the service side. Please look into that area a bit more and create a new ticket if necessary. The purpose of this ticket was to make sure the @lokeshbhattarai I created a feature request ticket to track your use case: #2842. I've given some background information in the ticket as to why the functionality is not currently present. If you have any more use case information to add, please let us know in the ticket. |
Closing this ticket as we have a FR ticket |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
Signout does not complete when closing the browser without action
Describe the bug
When calling signout, if the browser is displayed and then closed without any action, the signout process does not complete.
To Reproduce
Expected behavior
The signout process should either complete or throw an error when the browser is closed without any action.
Possible Cause
When the browser is closed without any action, a CancelSignOut event is issued.
Currently, only the sign-in state is restored at this event. (authentication, autorization)
It might be necessary in the _signout event synchronization process to wait for the SignoutCancel event and call an error in onComplete when the SignoutCancel event is received.
Reproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: