flavors / django-graphql-jwt

JSON Web Token (JWT) authentication for Graphene Django
https://django-graphql-jwt.domake.io
MIT License
820 stars 172 forks source link

How to delete a Token from the server-side (mutation). when a user gives a logout the token will be destroyed from server-side by using mutation? is it possible? If so. please explain. #301

Closed yabesh12 closed 2 years ago

TitanFighter commented 2 years ago

JWT is stateless authentication approach, ie server-side does not store any info about token, so nothing to remove. Either you need another authentication appoach or you need to add a DB and respecive code to store info about tokens (in order to have something to delete).

yabesh12 commented 2 years ago

Okay. I got a better approach without creating the DB for jwt. https://github.com/flavors/django-graphql-jwt/issues/11#issuecomment-616806837