From 612b2d58853389f7dd460b9ad85303a0496182f3 Mon Sep 17 00:00:00 2001 From: Jack Hamer <47187316+JackHamer09@users.noreply.github.com> Date: Tue, 3 Dec 2024 15:18:03 +0200 Subject: [PATCH] fix: sdk session expiry (#25) --- packages/sdk/src/client-auth-server/session/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/client-auth-server/session/index.ts b/packages/sdk/src/client-auth-server/session/index.ts index 309d4db..9ad024b 100644 --- a/packages/sdk/src/client-auth-server/session/index.ts +++ b/packages/sdk/src/client-auth-server/session/index.ts @@ -119,7 +119,7 @@ export const formatLimitPreferences = (limit: PartialLimit): Limit => { export const formatDatePreferences = (date: string | bigint | Date): bigint => { if (typeof date === "string") { - const now = new Date().getTime(); + const now = Math.floor(new Date().getTime() / 1000); const seconds = msStringToSeconds(date); return BigInt(now) + seconds; }