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

Implement a log out #314

Open
SergioR72 opened this issue May 24, 2023 · 1 comment
Open

Implement a log out #314

SergioR72 opened this issue May 24, 2023 · 1 comment

Comments

@SergioR72
Copy link

I'm using django, graphene and mongodb to make a project, but i have the problem that i dont know how implement a log out, i've tried to use refresh token to my application depends of this, because i saw that this refresh token have the posibility to revoke and make it expired, but i see that doesn't work, i receive the message "Cannot force an update in save() with no primary key.", anyone knows how to solve it?

@figure002
Copy link

figure002 commented Dec 13, 2023

It's not possible to revoke a token, see https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_for_Java_Cheat_Sheet.html#no-built-in-token-revocation-by-the-user

A refresh token is used to obtain a new token when the token is expired, so that's not useful for log out.

To log a user out, you can simply remove the token from the client.

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

2 participants