Skip to content
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

Logout #5

Open
ksnyder opened this issue Mar 18, 2021 · 2 comments
Open

Logout #5

ksnyder opened this issue Mar 18, 2021 · 2 comments

Comments

@ksnyder
Copy link

ksnyder commented Mar 18, 2021

How do you handle logging out? I see AuthSession.dismiss() in the logout function (commented out), but does that method actually log the user out? According to the docs, nothing is returned by this function, and I don’t believe it’s actually invalidating the token with Auth0. I’m trying to do a full logout, that is, clearing whatever Auth0 has cached on the device that allows users to log in or renew their token without having to re-enter their password. After calling .dismiss(), I find the app is still accessible without re-entering a password. I believe AuthSession.revokeAsync() may be what’s needed to accomplish this, but I haven’t been able to get it to work, I believe because I’m not passing it the correct arguments – I find the docs a bit vague and haven’t found any sample code that might clarify the use of this method. Logging out is a critical feature, it would be nice if we could piece it together so your sample code is more complete – thanks for providing it.

@benjy344
Copy link

benjy344 commented Sep 3, 2021

Did you find a solution, i'm having trouble to logout my users too ..

@nicholascm
Copy link

This may not fit your need, but if you are looking to log out the user from mobile (delete refresh token etc.) , and always force them to re-authenticate, auth0 may support a parameter like this: https://stackoverflow.com/a/14393492/3218158

AuthSession lets you pass { extraParams: { prompt: 'login' }} which was exactly what I needed in my use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants