Repository navigation
Conversation
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Inline JWKS verification creates a new local resolver on every call, so jose imports the same public key again for each token. This also affects
SUPABASE_JWKS, which is parsed into a fresh object for each request.Reuse resolvers in a 16-entry LRU cache keyed by the serialized key set. Changing or removing a key changes the cache key, including when the caller edits the existing object. Each resolver keeps a snapshot so later edits cannot change its symmetric-key lookup. Environment reads and parsing still happen on each resolution.
Fixes #199.
The import-reuse regressions fail on the original code. Tests also cover rotation, revocation, reparsed environment values, symmetric-key mutation and eviction with real signed tokens. All 592 tests pass. Tests, build and type checks pass on Node 22.22.3 and 26.13.1; lint, example type checks, dependency checks, package smoke tests, export checks and the JSR publish dry-run pass too. The local-stack E2E suite wasn't run.