From 89f3b8fd6f9b29670342b22e9e2ff22bac72e9db Mon Sep 17 00:00:00 2001 From: Solomon ogu Date: Fri, 10 Nov 2023 09:03:56 +0100 Subject: [PATCH] chores: fixed for auth --- src/index.ts | 5 +---- src/routes/auth/index.ts | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/index.ts b/src/index.ts index 9aecfca..6c3ede7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -22,10 +22,7 @@ export const setup = (app: Elysia) => exp: "15m", }) ) - .use(cookie({ - sameSite: "none", - secure: true, - })); + .use(cookie()); const app = new Elysia() .use( diff --git a/src/routes/auth/index.ts b/src/routes/auth/index.ts index eb57dd9..6d09992 100644 --- a/src/routes/auth/index.ts +++ b/src/routes/auth/index.ts @@ -150,7 +150,8 @@ export const auth = (app: Elysia) => setCookie("access_token", accessToken, { maxAge: 15 * 60, // 15 minutes path: "/", - sameSite: "strict", + domain: Bun.env.NODE_ENV === "production" ? "sacsbrainz.com" : "", + sameSite: "none", secure: Bun.env.NODE_ENV === "production", httpOnly: true, });