From 31f9049e0da89ad0195622eac2fc44cac476667b Mon Sep 17 00:00:00 2001 From: Bruno Perel Date: Sun, 17 Mar 2024 09:33:25 +0100 Subject: [PATCH] Fix expiresIn value --- packages/api/routes/auth/forgot.ts | 2 +- packages/api/routes/auth/util.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/api/routes/auth/forgot.ts b/packages/api/routes/auth/forgot.ts index 91af2df25..4ba2f1c95 100644 --- a/packages/api/routes/auth/forgot.ts +++ b/packages/api/routes/auth/forgot.ts @@ -11,7 +11,7 @@ const parseForm = bodyParser.json(); const generateToken = (payload: string) => jwt.sign(payload, process.env.TOKEN_SECRET!, { - expiresIn: "60m", + expiresIn: 3600, }); export const get = async ( diff --git a/packages/api/routes/auth/util.ts b/packages/api/routes/auth/util.ts index d09ac84a6..cf7062fd1 100644 --- a/packages/api/routes/auth/util.ts +++ b/packages/api/routes/auth/util.ts @@ -11,7 +11,7 @@ export const isValidEmail = (email: string) => EMAIL_REGEX.test(email); export const generateAccessToken = (payload: User) => jwt.sign(payload, process.env.TOKEN_SECRET!, { - expiresIn: `${60 * 24 * 14}m`, + expiresIn: 60 * 24 * 14, }); export const loginAs = async (user: user, hashedPassword: string) => generateAccessToken({