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

Cap PyJWT version to <2.10.0 to avoid incompatibility with subject claim type requirement #843

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

grayver
Copy link

@grayver grayver commented Jan 5, 2025

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 avoid breaking changes we cap PyJWT version to <2.10.0, but in next major release "sub" claim should be stringified introducing corresponding breaking change warning.

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