From 1394608e0113bec5b7a2c5ada8a53ac3c3fa39ae Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 24 Sep 2023 23:09:03 +0300 Subject: [PATCH] Try including domain in session cookie --- app/modules/auth/session.server.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/modules/auth/session.server.ts b/app/modules/auth/session.server.ts index 9a22c4741..1bd1b715a 100644 --- a/app/modules/auth/session.server.ts +++ b/app/modules/auth/session.server.ts @@ -8,8 +8,11 @@ if (process.env.NODE_ENV === "production") { } export const authSessionStorage = createCookieSessionStorage({ cookie: { + // xxx: if domain trick works this needs renaming to force people to log back in name: "_session", sameSite: "lax", + // need to specify domain so that sub-domains can access it + domain: process.env.NODE_ENV === "production" ? "sendou.ink" : undefined, path: "/", httpOnly: true, secrets: [process.env["SESSION_SECRET"] ?? "secret"],