Skip to content

Commit b7f7d38

Browse files
Bugfix: Add clockTolerance to cookie decryption (#2097)
1 parent f69d94d commit b7f7d38

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/server/cookies.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,10 @@ export async function decrypt<T>(
5151
BYTE_LENGTH
5252
);
5353

54-
const cookie = await jose.jwtDecrypt<T>(
55-
cookieValue,
56-
encryptionSecret,
57-
options
58-
);
54+
const cookie = await jose.jwtDecrypt<T>(cookieValue, encryptionSecret, {
55+
...options,
56+
...{ clockTolerance: 15 }
57+
});
5958

6059
return cookie;
6160
}

0 commit comments

Comments
 (0)