Skip to content

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

Merged
Andrew-Chen-Wang merged 2 commits intojazzband:masterfrom
grayver:master
Jan 9, 2025
Merged

Cap PyJWT version to <2.10.0 to avoid incompatibility with subject claim type requirement#843
Andrew-Chen-Wang merged 2 commits intojazzband:masterfrom
grayver:master

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
20 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

Comments