-
Notifications
You must be signed in to change notification settings - Fork 31
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
JWT blacklist #526
Comments
The first challenge I'm facing is how to add a |
Hey.
|
I want to revoke the tokens themselves. I've implemented this by storing a plaintext reference to the JWT signature along with a revocation boolean field. I load this blacklist into the cache and check all authenticated requests against it. PR here: commonknowledge/mapped#46 Re JTIs, a quote trom the article above:
|
Ok so AFAIR you want that the api clients would not be required to use a refresh token something like github tokens so you want to make the fresh tokens revokeable in order for them to be usefull for long periods, correct? If that so, why not just to authenticate yourself via a refresh token? You can setup a public authorization field that would accept refresh tokena instead of short tokens. |
Oh, that's a nice idea! I'm not immediately sure what that would precisely look like but may take a look at this and report back here. For now, I'll post this PR here for how I hacked a first version of blacklisted tokens: https://github.com/commonknowledge/meep-intelligence-hub/pull/46/files |
Thanks for sharing, on my TODO 😄 We might as well rename |
We're setting up a simple public API ontop of our private API, and we want to use the same Strawberry setup.
As part of this, we'd like to extend the use of JWT tokens for use as long-lasting API tokens that can be revoked.
Some research led to the strategy of revocation via blacklisting tokens, and it'd be fantastic if this was built in to the library.
The text was updated successfully, but these errors were encountered: