docs: added "partitioned: true" for cross-domain (foreign) cookies (#1591)

This commit is contained in:
Khiet Tam Nguyen
2025-03-01 09:20:04 +11:00
committed by GitHub
parent 8ec35e01bd
commit e613bf492c
2 changed files with 5 additions and 2 deletions

View File

@@ -71,6 +71,7 @@ export const auth = betterAuth({
secure: true,
httpOnly: true,
sameSite: "none", // Allows CORS-based cookie sharing across subdomains
partitioned: true // New browser standards will mandate this for foreign cookies
},
},
trustedOrigins: [

View File

@@ -127,7 +127,8 @@ export const auth = createAuth({
advanced: {
defaultCookieAttributes: {
sameSite: "none",
secure: true
secure: true,
partitioned: true // New browser standards will mandate this for foreign cookies
}
}
})
@@ -141,7 +142,8 @@ export const auth = createAuth({
cookies: {
sessionToken: {
sameSite: "none",
secure: true
secure: true,
partitioned: true // New browser standards will mandate this for foreign cookies
}
}
}