-
Notifications
You must be signed in to change notification settings - Fork 209
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
Enable WebAuth Logout for Android & Fix iOS Logout. #223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Quick question but why when you log out using iOS does the dialog say "..wants to use Auth0 to Sign In"? It's just a bit jarring.
@stevehobbsdev I think that's how iOS behaves when trying to open a link from the app. @cocojoe can you clarify that, please? |
Force-merging as codecov is having issues again. |
@cocojoe @lbalmaceda A shot in the dark - but is there any way to clear any previous sessions (or do whatever |
@bneigher Although I totally agree it isn't the most beautiful experience. This behaviour is part of Apple's functionality for the recommended way to implement Auth flow, the only way to clear the cookies is by using the same flow so the correct cookie jar is used. So the dialog will be presented and there is no way to disable it. However, be great for you to feedback on this at https://auth0.com/feedback |
Changes
This PR enables the clear session feature for Android and fixes it for iOS.
When this is merged, it will always send the
client_id
and thereturnTo
parameters when opening the Auth0 logout URL.Devs would need to whitelist the
returnTo
URL in the "Allowed Logout URLs" section of their application's settings in the Auth0 dashboard. Fail to do so will show an error page when the redirect is attempted.Sample usage:
Breaking changes?
At first, seems to only affect iOS only (because Android was disabled!). But if we look deeper, the current behavior is to open the logout URL without passing any
returnTo
norclientId
values. Testing this in an iOS simulator resulted in a browser showing the text "OK" and not redirecting back to the app. So even if the log out was successful, I had to manually close the browser in order to get back to the app.With the changes introduced in this PR, users will either face the "URL not whitelisted" screen when there's a dashboard configuration error or return successfully to the app after logging out.
Current iOS behavior:
http://recordit.co/TQqX1AyApp
iOS behavior after this PR:
http://recordit.co/gWa1dlR8Zp
Android behavior after this PR:
http://recordit.co/GcPBbvQeNh
Testing
Checklist