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

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

grayver
Copy link
Contributor

@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.

Copy link
Member

@Andrew-Chen-Wang Andrew-Chen-Wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks grayver!!!

@Andrew-Chen-Wang Andrew-Chen-Wang merged commit 9a66629 into jazzband:master Jan 9, 2025
21 checks passed
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
2 participants