Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

wip: nextauth sameSite settings probing

Richie McIlroyd13c75591a11
diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts
index 04cafc299..4d40e49c5 100644
--- a/apps/web/middleware.ts
+++ b/apps/web/middleware.ts
@@ -23,7 +23,7 @@ export function middleware(request: NextRequest) {
name: `${VERCEL_DEPLOYMENT ? "__Secure-" : ""}next-auth.session-token`,
value: token,
path: "/",
- sameSite: "lax",
+ sameSite: "none",
secure: VERCEL_DEPLOYMENT,
httpOnly: true,
domain: VERCEL_DEPLOYMENT ? ".cap.so" : undefined,
diff --git a/packages/database/auth/auth-options.ts b/packages/database/auth/auth-options.ts
index 97fcd36b0..724642cd1 100644
--- a/packages/database/auth/auth-options.ts
+++ b/packages/database/auth/auth-options.ts
@@ -39,7 +39,7 @@ export const authOptions: NextAuthOptions = {
name: `${VERCEL_DEPLOYMENT ? "__Secure-" : ""}next-auth.session-token`,
options: {
httpOnly: true,
- sameSite: "lax",
+ sameSite: "none",
path: "/",
domain: VERCEL_DEPLOYMENT ? ".cap.so" : undefined,
secure: VERCEL_DEPLOYMENT,