diff --git a/lib/auth/authOptions.ts b/lib/auth/authOptions.ts index af81f39..c257c46 100644 --- a/lib/auth/authOptions.ts +++ b/lib/auth/authOptions.ts @@ -30,4 +30,16 @@ export const authOptions: NextAuthOptions = { maxAge: 30 * 24 * 60 * 60, // 30 days }, secret: process.env.NEXTAUTH_SECRET, + cookies: { + sessionToken: { + name: `__Secure-next-auth.session-token`, + options: { + httpOnly: true, + sameSite: "lax", + path: "/", + secure: true, + domain: ".vibnai.com", // share across all subdomains (theia.vibnai.com, etc.) + }, + }, + }, };