From 086f910312965c3bb6b1538c24c91befb4d438e1 Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Fri, 1 Nov 2024 11:38:34 +0100 Subject: [PATCH] chore: exp value fix in JWT payload --- packages/oid4vci-common/lib/functions/ProofUtil.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/oid4vci-common/lib/functions/ProofUtil.ts b/packages/oid4vci-common/lib/functions/ProofUtil.ts index 539854a0..6e7835f3 100644 --- a/packages/oid4vci-common/lib/functions/ProofUtil.ts +++ b/packages/oid4vci-common/lib/functions/ProofUtil.ts @@ -147,7 +147,7 @@ const createJWT = (mode: PoPMode, jwtProps?: JwtProps, existingJwt?: Jwt): Jwt = const jwtPayload: Partial = { ...(aud && { aud }), iat: jwt.payload?.iat ?? Math.floor(now / 1000) - 60, // Let's ensure we subtract 60 seconds for potential time offsets - exp: jwt.payload?.exp ?? (Math.floor(now / 1000) + 10) * 60, + exp: jwt.payload?.exp ?? Math.floor(now / 1000) + (10 * 60), nonce, ...(client_id && { client_id }), ...(iss && { iss }),