Skip to content

Commit 055752c

Browse files
committed
fix: add clockTolerance
1 parent 8da0af1 commit 055752c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/jwt-verification.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ export async function verifyJwt(token: string): Promise<AppJWTPayload> {
3333
const { payload } = await jwtVerify(bearerToken, JWKS, {
3434
issuer: env.SSO_ISSUER,
3535
audience: env.JWT_AUDIENCE,
36+
clockTolerance: 60, // 60 seconds clock tolerance for clock skew between issuer and verifier
3637
})
3738
if (!payload.email || !payload.name || !payload.sub) {
3839
throw new Error('JWT missing required claims')

0 commit comments

Comments
 (0)