From 950a03c6c9fba7e6593490a56ec281bb2156ddd7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Fri, 21 Mar 2025 12:47:04 -0700 Subject: [PATCH] feat[session]: increase session durations for better UX --- sim/app/lib/auth.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sim/app/lib/auth.ts b/sim/app/lib/auth.ts index 51e6ba0b75..21d339cb23 100644 --- a/sim/app/lib/auth.ts +++ b/sim/app/lib/auth.ts @@ -37,8 +37,11 @@ export const auth = betterAuth({ session: { cookieCache: { enabled: true, - maxAge: 5 * 60, // Cache duration (5 minutes) + maxAge: 24 * 60 * 60, // 24 hours in seconds }, + expiresIn: 30 * 24 * 60 * 60, // 30 days (how long a session can last overall) + updateAge: 24 * 60 * 60, // 24 hours (how often to refresh the expiry) + freshAge: 60 * 60, // 1 hour (or set to 0 to disable completely) }, account: { accountLinking: {