chore: enforce cookie options for more security (#5618)

This commit is contained in:
Johannes
2025-05-05 05:09:35 -07:00
committed by GitHub
parent 66fcf4b79b
commit 7538e570c5

View File

@@ -177,6 +177,17 @@ export const authOptions: NextAuthOptions = {
// Conditionally add enterprise SSO providers
...(ENTERPRISE_LICENSE_KEY ? getSSOProviders() : []),
],
cookies: {
sessionToken: {
name: "next-auth.session-token",
options: {
httpOnly: true,
secure: process.env.NODE_ENV === "production",
sameSite: "lax",
path: "/",
},
},
},
session: {
maxAge: 3600,
},