-
Notifications
You must be signed in to change notification settings - Fork 126
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
question. How do I invalidate an existing token? #126
Comments
@SanderElias Here are some resources on how to invalidate a jwt token: http://stackoverflow.com/questions/21978658/invalidating-json-web-tokens The easiest way is to just remove the token from the client. If you're worried about security, you'll need to implement a more advanced security system. |
@eventhough I knew about that. For example, if there would be a md5-hash(or other identifier) of the token would be available somewhere in the request, it would make things a lot simpler. For now, this is single server, so i could keep an array of invalid tokens, along with their expiry times, in memory. |
@SanderElias If you need some kind of token identifier, you could probably use |
Maybe take a look at the "jti" property of the jwt |
@vdeturckheim great recommendation! @SanderElias it looks like you will have to add |
@SanderElias we store our JWT-based sessions in a Redis datastore and lookup the session for the given JWT during the |
@SanderElias please let us know if you still need further clarification on this. otherwise can we close the issue? thanks. 👍 |
I'm in the situation that I need a way to invalidate an existing token.
Once a token is invalidated, it should not be possible to auth with it anymore. I could not find a way do do this. did I miss something, or is this not supported yet?
The text was updated successfully, but these errors were encountered: