feat[session]: increase session durations for better UX

This commit is contained in:
Waleed Latif
2025-03-21 12:47:04 -07:00
parent dc0248ded1
commit 950a03c6c9

View File

@@ -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: {