From 32c8d951c7f7952906bf1485e4f7daf1a8b89c69 Mon Sep 17 00:00:00 2001 From: Ankuuush Date: Sun, 17 Dec 2023 18:29:10 +0530 Subject: [PATCH] Config sec to days --- src/config.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/config.ts b/src/config.ts index 276730b..7867110 100644 --- a/src/config.ts +++ b/src/config.ts @@ -15,12 +15,19 @@ export const db = { export const corsUrl = process.env.CORS_URL; +// export const tokenInfo = { +// accessTokenValidity: parseInt(process.env.ACCESS_TOKEN_VALIDITY_SEC || '0'), +// refreshTokenValidity: parseInt(process.env.REFRESH_TOKEN_VALIDITY_SEC || '0'), +// issuer: process.env.TOKEN_ISSUER || '', +// audience: process.env.TOKEN_AUDIENCE || '', +// }; + export const tokenInfo = { - accessTokenValidity: parseInt(process.env.ACCESS_TOKEN_VALIDITY_SEC || '0'), - refreshTokenValidity: parseInt(process.env.REFRESH_TOKEN_VALIDITY_SEC || '0'), + accessTokenValidityDays: parseInt(process.env.ACCESS_TOKEN_VALIDITY_DAYS || '0'), + refreshTokenValidityDays: parseInt(process.env.REFRESH_TOKEN_VALIDITY_DAYS || '0'), issuer: process.env.TOKEN_ISSUER || '', audience: process.env.TOKEN_AUDIENCE || '', -}; + }; export const logDirectory = process.env.LOG_DIR;