This repository was archived by the owner on Oct 10, 2025. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 194
feat: introduce getClaims method to verify asymmetric JWTs #1030
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
hf
reviewed
Jan 29, 2025
2e4ce9a to
a26e5dc
Compare
895152d to
17e5736
Compare
17e5736 to
0affd19
Compare
hf
reviewed
Feb 10, 2025
hf
reviewed
Feb 10, 2025
hf
reviewed
Feb 10, 2025
hf
approved these changes
Feb 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the suggestions above!
Co-authored-by: Stojan Dimitrovski <[email protected]>
Co-authored-by: Stojan Dimitrovski <[email protected]>
hf
approved these changes
Feb 10, 2025
kangmingtay
pushed a commit
that referenced
this pull request
Mar 24, 2025
🤖 I have created a release *beep* *boop* --- ## [2.69.0](v2.68.0...v2.69.0) (2025-03-22) ### Features * introduce getClaims method to verify asymmetric JWTs ([#1030](#1030)) ([daa2669](daa2669)) ### Bug Fixes * assert type in `decodeJWTPayload` ([#1018](#1018)) ([3d80039](3d80039)) * set jwks_cached_at ([#1039](#1039)) ([9bdc023](9bdc023)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mandarini
pushed a commit
to supabase/supabase-js
that referenced
this pull request
Oct 2, 2025
🤖 I have created a release *beep* *boop* --- ## [2.69.0](supabase/auth-js@v2.68.0...v2.69.0) (2025-03-22) ### Features * introduce getClaims method to verify asymmetric JWTs ([#1030](supabase/auth-js#1030)) ([6d12676](supabase/auth-js@6d12676)) ### Bug Fixes * assert type in `decodeJWTPayload` ([#1018](supabase/auth-js#1018)) ([1a78f42](supabase/auth-js@1a78f42)) * set jwks_cached_at ([#1039](supabase/auth-js#1039)) ([0f79bce](supabase/auth-js@0f79bce)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
grdsdev
added a commit
to supabase/supabase-flutter
that referenced
this pull request
Oct 6, 2025
…aims This introduces a new `getClaims` method that supports verifying JWTs (both symmetric and asymmetric) and returns the entire set of claims in the JWT payload. Key changes: - Add `getClaims()` method to GoTrueClient for JWT verification and claims extraction - Implement base64url encoding/decoding utilities (RFC 4648) - Add JWT types: JwtHeader, JwtPayload, DecodedJwt, GetClaimsResponse - Add helper functions: decodeJwt() and validateExp() - Add AuthInvalidJwtException for JWT-related errors - Include comprehensive tests for getClaims, JWT helpers, and base64url utilities The method verifies JWTs by calling getUser() to validate against the server, supporting both HS256 (symmetric) and RS256/ES256 (asymmetric) algorithms. Note: This is an experimental API and may change in future versions. Ported from: supabase/auth-js#1030 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
getClaimssupports verifying JWTs (both asymmetric and symmetric) and returns the entire set of claims in the JWT payload