Skip to content

Commit

Permalink
feat(backend): Increase the default value for clock skew in `verifyJw…
Browse files Browse the repository at this point in the history
…t` from 2 to 5 seconds (#1428)

* feat(backend): Increase the default value for clock skew in `verifyJwt` from 2 to 5 seconds

---------

Co-authored-by: Nikos Douvlis <nikosdouvlis@gmail.com>
  • Loading branch information
anagstef and nikosdouvlis authored Jun 29, 2023
1 parent 90725a2 commit 5957a3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/thirty-chefs-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/backend': patch
---

Increase the default value for clock skew in `verifyJwt` from 2 to 5 seconds
2 changes: 1 addition & 1 deletion packages/backend/src/tokens/jwt/verifyJwt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { assertAudienceClaim } from './assertions';

type IssuerResolver = string | ((iss: string) => boolean);

const DEFAULT_CLOCK_SKEW_IN_SECONDS = 2 * 1000;
const DEFAULT_CLOCK_SKEW_IN_SECONDS = 5 * 1000;

const algToHash: Record<string, string> = {
RS256: 'SHA-256',
Expand Down

0 comments on commit 5957a3d

Please sign in to comment.