Skip to content

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

Closed
grayver wants to merge 1 commit intojazzband:masterfrom
grayver:master
Closed

Don't validate subject claim for compatibility with PyJWT>=2.10#837
grayver wants to merge 1 commit intojazzband:masterfrom
grayver:master

Conversation

@grayver
Copy link
Contributor

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

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.

please see #831 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Updating PyJWT to 2.10.0 broke login

2 participants

Comments