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

Don't validate subject claim for compatibility with PyJWT>=2.10 #837

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

grayver
Copy link

@grayver grayver commented Dec 26, 2024

This fixes #831

Since PyJWT starting from 2.10 forces "sub" JWT claim to be a string, but default Django User model has integer key and it's used as "sub" claim by default - this causes authentication failures with a valid token. To fix that we omit subject validation by specifying corresponding option in token decode invocation.

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

Successfully merging this pull request may close these issues.

Updating PyJWT to 2.10.0 broke login
1 participant