From 180b3fb57912b1da63c2ff264355b3395bdcd389 Mon Sep 17 00:00:00 2001 From: Yunus Date: Sun, 1 Dec 2024 13:32:50 +0700 Subject: [PATCH] Add maxAge to cookie to 90 days --- server/api/auth/sign-in-google.post.ts | 1 + tests-e2e/setup/auth.setup.mts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/server/api/auth/sign-in-google.post.ts b/server/api/auth/sign-in-google.post.ts index aa5d2cd..76c1cf6 100644 --- a/server/api/auth/sign-in-google.post.ts +++ b/server/api/auth/sign-in-google.post.ts @@ -98,5 +98,6 @@ export const signInUser = ( httpOnly: false, secure: true, sameSite: 'lax', + maxAge: 90 * 86400, }) } diff --git a/tests-e2e/setup/auth.setup.mts b/tests-e2e/setup/auth.setup.mts index 7b4073c..a29105b 100644 --- a/tests-e2e/setup/auth.setup.mts +++ b/tests-e2e/setup/auth.setup.mts @@ -13,7 +13,7 @@ setup('authenticate', async ({ page }) => { sameSite: 'Lax', path: '/', domain: domain, - expires: -1, + expires: 90 * 86400, }]) await page.context().storageState({ path: authFile });