Skip to content

Conversation

@chris-stytch
Copy link
Contributor

@chris-stytch chris-stytch commented Nov 11, 2025

Description

This PR updates PyJWT to 2.9 to resolve a bug in local JWT validation.

Local JWT validation was silently failing, forcing unnecessary fallbacks to the Stytch API.

Root Cause: The SDK passes allowed_issuers: List[str] to PyJWT's decode() function, but PyJWT versions 2.4.x-2.8.x only accepted str | None for the issuer parameter. This caused a type mismatch where string vs list comparison always returned False, incorrectly rejecting all valid JWTs with "Invalid issuer" errors.

Support for lists in issuers was added to PyJWT in 2.9.0: https://pyjwt.readthedocs.io/en/stable/changelog.html?utm_source=chatgpt.com#v2-9-0

@chris-stytch chris-stytch requested a review from a team as a code owner November 11, 2025 19:46
@logan-stytch
Copy link
Contributor

Update version.py for the auto release, btw

@logan-stytch logan-stytch changed the title Update PyJWT to 2.10.1 Update PyJWT to 2.9 Nov 12, 2025
@logan-stytch logan-stytch merged commit 4015468 into main Nov 12, 2025
7 checks passed
@logan-stytch logan-stytch deleted the co/bump-pyjwt-2.10.1 branch November 12, 2025 18:05
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.

3 participants