fix: report missing JWKS as ENV_ERROR in user-mode verification - #128
Merged
Conversation
mandarini
force-pushed
the
fix/missing-jwks-env-error
branch
from
August 27, 2026 13:18
ab1ea42 to
ab44d43
Compare
commit: |
mandarini
force-pushed
the
fix/missing-jwks-env-error
branch
from
August 27, 2026 14:45
ab44d43 to
fa38ee1
Compare
mandarini
marked this pull request as ready for review
August 27, 2026 14:57
tomaspozo
approved these changes
Aug 27, 2026
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.
withSupabase({ auth: 'user' })returned a 401INVALID_CREDENTIALSwhen a request carried a user token but no JWKS source was configured, while the standalone claims middlewares report the same state as a 500ENV_ERROR. A missing JWKS is a server misconfiguration, not a caller error, soverifyCredentialsnow reports it as a 500ENV_ERROR, checked only after every allowed mode has been tried. Fallthrough is unchanged: another matching mode still wins, and requests with no token or with ansb_*key in the Authorization slot still get a 401. Adds parity tests that pinwithRequiredClaimsandwithSupabase({ auth: 'user' })to the same status and code for the same request, and documents the new case in the error-handling table.