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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(backend): Fix typo in jwk-remote-missing error message #3057

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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