From e613bf492c7efb46097b9c1b436da1fed10ecc84 Mon Sep 17 00:00:00 2001 From: Khiet Tam Nguyen <86177399+nktnet1@users.noreply.github.com> Date: Sat, 1 Mar 2025 09:20:04 +1100 Subject: [PATCH] docs: added "partitioned: true" for cross-domain (foreign) cookies (#1591) --- docs/content/docs/concepts/cookies.mdx | 1 + docs/content/docs/integrations/hono.mdx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/content/docs/concepts/cookies.mdx b/docs/content/docs/concepts/cookies.mdx index 3651198687..1ba6dd3264 100644 --- a/docs/content/docs/concepts/cookies.mdx +++ b/docs/content/docs/concepts/cookies.mdx @@ -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: [ diff --git a/docs/content/docs/integrations/hono.mdx b/docs/content/docs/integrations/hono.mdx index e97061b399..b00c9fa5a5 100644 --- a/docs/content/docs/integrations/hono.mdx +++ b/docs/content/docs/integrations/hono.mdx @@ -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 } } }