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 doesn't work #10

Open
alihassan711 opened this issue Apr 5, 2022 · 0 comments
Open

Logout doesn't work #10

alihassan711 opened this issue Apr 5, 2022 · 0 comments

Comments

@alihassan711
Copy link

alihassan711 commented Apr 5, 2022

Hi, great flutter demo with OAuth2 with ThingsBoard - finally found a sample that actually works! Question more than anything - how is Logout supposed to work? Right now it deletes the refresh token and JWT token, but when you click Login again with the Auth0 link (containing the sign-in page), it re-logs me in using previous credentials. I was expecting a logout that forces the user to sign in again or change credentials. How do you envision that to work? Was that the intention of Logout? Maybe we need PR that does both? Or maybe that's a setting in Auth0 or ThingsBoard connections?
thanks - great demo! Below is the code snippet

tbClient.logout();

Future logout({RequestConfig? requestConfig}) async {
try {
await post('/api/auth/logout',
options: defaultHttpOptionsFromConfig(requestConfig));
await _clearJwtToken();
} catch (e) {
await _clearJwtToken();
}
}

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

1 participant