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

Pass access/refresh claims to session for claim verification #141

Merged
merged 1 commit into from
Sep 21, 2024

Conversation

floriandejonckheere
Copy link
Contributor

@floriandejonckheere floriandejonckheere commented Sep 19, 2024

As of JWT 2.9, token claims that do not pass verification raise an error. JWT 2.8.2 did not display this behaviour. Since jwt_sessions did not pass the token claims, verification always fails (when it's enabled).

# jwt 2.8.2
JWT.decode(token, "secret", true, verify_iss: true)
# => [{"exp"=> ...

# jwt 2.9.0
JWT.decode(token, "secret", true, verify_iss: true)
# => Invalid issuer. Expected [], received issuer (JWT::InvalidIssuerError)

JWT.decode(token, "secret", true, verify_iss: true, iss: "issuer")
# => [{"exp"=> ...

The same applies to both verify_iss and verify_aud.

@floriandejonckheere floriandejonckheere marked this pull request as ready for review September 19, 2024 09:11
@tuwukee tuwukee merged commit 8f6fb24 into tuwukee:main Sep 21, 2024
0 of 2 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.

2 participants