fix: enable cross-subdomain cookies for session sharing
This commit is contained in:
@@ -24,6 +24,20 @@ export const auth = betterAuth({
|
||||
session: {
|
||||
expiresIn: 60 * 60 * 24 * 7, // 7 days
|
||||
updateAge: 60 * 60 * 24, // Update session every day
|
||||
cookieCache: {
|
||||
enabled: true,
|
||||
maxAge: 60 * 5, // 5 minutes
|
||||
},
|
||||
},
|
||||
advanced: {
|
||||
crossSubDomainCookies: {
|
||||
enabled: true,
|
||||
domain: process.env.COOKIE_DOMAIN || '.thenetwork.donovankelly.xyz',
|
||||
},
|
||||
defaultCookieAttributes: {
|
||||
secure: true,
|
||||
sameSite: 'none',
|
||||
},
|
||||
},
|
||||
trustedOrigins: [
|
||||
process.env.APP_URL || 'http://localhost:3000',
|
||||
|
||||
Reference in New Issue
Block a user