change csrf cookie to secure not host

This commit is contained in:
msukkari 2025-02-14 12:32:36 -08:00
parent 4cf3024967
commit 354b004402

View file

@ -99,7 +99,7 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
}
},
csrfToken: {
name: `${useSecureCookies ? '__Host-' : ''}authjs.csrf-token`,
name: `${useSecureCookies ? '__Secure-' : ''}authjs.csrf-token`,
options: {
httpOnly: true,
sameSite: 'lax',