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

Selective application of JWT expiration check for specific operations #316

Open
havardox opened this issue Jun 29, 2023 · 0 comments
Open

Comments

@havardox
Copy link

havardox commented Jun 29, 2023

Currently, in Django GraphQL JWT, when the JWT_VERIFY_EXPIRATION setting is set to True, JWT expiration is enforced globally for all GraphQL mutations and queries. Any time you want to query something and the token has expired, it just gives the "Signature has expired" error message. I would want to instead apply JWT expiration selectively to specific operations instead of applying it to my entire API. Is there any way to do that?

Edit: It seems to only apply when the jwt_cookie decorator is enabled in urls.py. It reads the HttpOnly cookie and sees that the token is expired and throws the "Signature has expired" message, even when the resolver itself doesn't require JWT authentication.

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