From f0c175094db7fc4fcc4a17527a4258da79028c38 Mon Sep 17 00:00:00 2001 From: Stojan Dimitrovski Date: Wed, 28 Aug 2024 15:23:05 +0200 Subject: [PATCH] fix: set `max-age` default cookie option to a sensible value --- src/utils/constants.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 30454ee..789fbd8 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -4,5 +4,6 @@ export const DEFAULT_COOKIE_OPTIONS: CookieOptions = { path: "/", sameSite: "lax", httpOnly: false, - maxAge: 60 * 60 * 24 * 365 * 1000, + // Set to 5 years because Chrome does not accept very large values of this number. All Supabase Auth sessions effectively will end after this much time. + maxAge: 5 * 60 * 60 * 24 * 365, };