From 846b8bfeb32aba5e8dec9a8f0a8729bbc9a57121 Mon Sep 17 00:00:00 2001 From: paulpascal Date: Thu, 28 Nov 2024 14:25:11 +0000 Subject: [PATCH] Fix Token Expiration in contact move (#230) * fix: increase session token exp to 96h * feat: match login expiry with queue session expiration --- src/lib/authentication.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/authentication.ts b/src/lib/authentication.ts index 720df9d7..9605cc5f 100644 --- a/src/lib/authentication.ts +++ b/src/lib/authentication.ts @@ -2,8 +2,8 @@ import process from 'process'; import jwt from 'jsonwebtoken'; import ChtSession from './cht-session'; -const LOGIN_EXPIRES_AFTER_MS = 2 * 24 * 60 * 60 * 1000; -const QUEUE_SESSION_EXPIRATION = '48h'; +const LOGIN_EXPIRES_AFTER_MS = 4 * 24 * 60 * 60 * 1000; +const QUEUE_SESSION_EXPIRATION = '96h'; const { COOKIE_PRIVATE_KEY, WORKER_PRIVATE_KEY } = process.env; const PRIVATE_KEY_SALT = '_'; // change to logout all users const COOKIE_SIGNING_KEY = COOKIE_PRIVATE_KEY + PRIVATE_KEY_SALT;