-
Notifications
You must be signed in to change notification settings - Fork 26
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
Notification on authentication status change #56
Comments
Yes, when you create the Looking at how this works in the iD source code might be helpful too.. |
@bhousel thanks for the quick answer! My concern is handling the "user switching". For example, if the user revokes the token, and afterwards attempts to make an authenticated request, how would I detect that? Also, what happens if the user closes the authentication popup, instead of authenticating - is there a way to handle that? Thanks for the code link, studying it now. |
I think if the tokens are revoked the OSM API will return an error, as long as your app is using
Looks like this library don't do it yet: Lines 31 to 32 in 31494a5
I guess we'd need to add an event handler for that popup page and add a |
Is there an way to track when authentication status changes? For example, if during a request, authentication changes from non-authenticated to authenticated, it would be good to call my event handler. Also, it should be called if client had to re-login (possibly under different credentials) during the request handling.
My goal is to update UI if login status has changed.
Thanks!
The text was updated successfully, but these errors were encountered: