Skip to content

Commit

Permalink
fix(backend): Fix typo in jwk-remote-missing error message (#3057)
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkl committed Mar 27, 2024
1 parent 6347496 commit 988a299
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilly-tips-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Fix typo in `jwk-remote-missing` error message
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/__tests__/keys.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export default (QUnit: QUnit) => {
action: 'Contact support@clerk.com',
});
assert.propContains(err, {
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid are available: ${mockRsaJwkKid}, local`,
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT. The following kid is available: ${mockRsaJwkKid}, local`,
});
} else {
// This should never be reached. If it does, the suite should fail
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export async function loadClerkJWKFromRemote({
throw new TokenVerificationError({
action: TokenVerificationErrorAction.ContactSupport,
message: `Unable to find a signing key in JWKS that matches the kid='${kid}' of the provided session token. Please make sure that the __session cookie or the HTTP authorization header contain a Clerk-generated session JWT.${
jwkKeys ? ` The following kid are available: ${jwkKeys}` : ''
jwkKeys ? ` The following kid is available: ${jwkKeys}` : ''
}`,
reason: TokenVerificationErrorReason.RemoteJWKMissing,
});
Expand Down

0 comments on commit 988a299

Please sign in to comment.