From dd5b538783f9c806f0c883cd391754fb5c842ec8 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Mon, 28 Apr 2025 21:36:12 +0200 Subject: [PATCH] refactor(auth): Increased token timeouts to 24hrs/7days --- src/models/actions/create/CreateAuth.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/models/actions/create/CreateAuth.ts b/src/models/actions/create/CreateAuth.ts index 7350ec4..b7a8290 100644 --- a/src/models/actions/create/CreateAuth.ts +++ b/src/models/actions/create/CreateAuth.ts @@ -61,11 +61,11 @@ export class CreateAuth { } //Create the access token - const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 5 * 60 + const timestamp_accesstoken_expiry = Math.floor(Date.now() / 1000) + 24 * 60 * 60 newAuth.access_token = JwtCreator.createAccess(found_user, timestamp_accesstoken_expiry); newAuth.access_token_expires_at = timestamp_accesstoken_expiry //Create the refresh token - const timestamp_refresh_expiry = Math.floor(Date.now() / 1000) + 10 * 36000 + const timestamp_refresh_expiry = Math.floor(Date.now() / 1000) + 7 * 24 * 60 * 60 newAuth.refresh_token = JwtCreator.createRefresh(found_user, timestamp_refresh_expiry); newAuth.refresh_token_expires_at = timestamp_refresh_expiry return newAuth;