-
Notifications
You must be signed in to change notification settings - Fork 117
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
We can't sign out the user which is signInWithSocialWebUI #2839
Comments
Do you have your signout redirect url configured correctly through Cognito and your SAML provider? Please post how |
Besides, we have turned on "Sign-out flow" to log out Microsoft Entra which is our identity provider when calling Amplify.Auth.signout() In this case, we found that during sign out, it will popup WebView and open two pages By the way, I found that the second WebView Uri is abnormal as follows |
I've had another report in the past on issues with receiving the signout redirect with a Microsoft SAML and I'm not sure I ever received a final response from the customer as to what the issue was. Let me see if I can ask around some of our teams to see if they are familiar with what may be happening. |
Hi tyler, thanks for your quick response. we look forward to have a solution in the future. |
Same issue here, anything update? Thanks. |
Hi tyler, unfortunately, I followed your instruction to add logout URL, however it doesn't work. Our application is pending in this web page and the url is as follows. |
Hi @ScottLu77 I think we'e gotten the issue narrowed down. I had not enabled the Sign Out Flow on the Cognito side. Once I did this, I was able to observe the same issue you were running into. The Cognito documentation states: "Your IdP must send the LogoutResponse in an HTTP POST request." I've found a post on a Microsoft support site that shows Entra does not support HTTP Post binding for sign out. |
Hi Tyler, thanks for your feedback. |
I'm sorry, without support from Entra on providing the LogoutResponse as an HTTP POST request, there are no alternatives I can provide. The other issue we face is that Chrome Custom Tabs do not allow us to clear browser session/cookie information. This is the reason the signOut method is only able to clear credentials on the Cognito side, and not third party social provider. |
So you mean it's not possible letting user sso login to a different account without Google Android support? |
The user could log into a different account if they open a web browser and log out of Microsoft Entra manually. I understand this is not a great experience but there are no API's that allow us to control web session/cookies from Microsoft in the browser. That is not something we have permission to do. Unfortunately due to Entra's limitation in providing the LogoutResponse, Cognito is not getting the required information it needs to complete the sign out and redirect the user back into the application. |
But why is that everything works well when I switch back to android-amplify v1 (1.38.8)? |
Hi @ScottLu77, Amplify v1 had a 10 second wait on receiving the redirect. If the 10 second timeout was hit, the rest of the sign out (ex: clearing the local tokens) would succeed. This behavior was modified in v2 to ensure that the browser signout succeeded. This decision was made because calling signInWithHostedUi after a failed browser sign out would automatically re-sign the user in as the cached user, even in the non-social sign in flow. Can you please confirm how Amplify v1 appears on signOut. I would expect it to hang in the browser on the "An error was encountered with the requested page" screen. Then once 10 seconds is hit, or the user cancels, the local sign out proceeds. If you are not seeing this behavior, please let me know. It would be helpful to provide logs of the v1 sign out and possibly provide a video where we can see the redirects happening. |
Hi Tyler, update Amplify v1 behavior for your reference. It seems that with Amplify V1, our app receive the redirect soon and sign out successfully without waiting for 10 second timeout. sign out timestamp is "06-17 16:18:39.893" |
I'm not sure that is showing AWS. That link is still a Microsoft link, not a Cognito link. Do you have to close each of the windows, or does the redirect happen and automatically close the windows? We can take a look on v1 behavior on our end and update the ticket. |
Yes, we need to programmatically close all windows and restart our app's welcome activity as follows. But at least the amplify v1 can be signed out successfully. |
Please provide a thumbs up or comment on this feature request ticket to help us prioritize a feature request that would allow local sign out to complete even if the sign out is cancelled (custom tab closed without receiving redirect). #2842 |
Before opening, please confirm:
Language and Async Model
Kotlin
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
We can't sign out the user which is signInWithSocialWebUI.
When I call signout and it will popup a webview instead redirect back to my app.
Reproduction steps (if applicable)
Code Snippet
Log output
amplifyconfiguration.json
GraphQL Schema
Additional information and screenshots
We are using AWS SAML provider(Azure), and enable "Sign-out flow" of the custom provider
The text was updated successfully, but these errors were encountered: