diff --git a/server/routes/auth/index.ts b/server/routes/auth/index.ts index 8a2a0be55..4a71b944f 100644 --- a/server/routes/auth/index.ts +++ b/server/routes/auth/index.ts @@ -34,7 +34,7 @@ router.get("/redirect", auth(), async (ctx: APIContext) => { ctx.cookies.set("accessToken", jwtToken, { httpOnly: false, - sameSite: true, + sameSite: "lax", expires: addMonths(new Date(), 3), }); const [team, collection, view] = await Promise.all([ diff --git a/server/utils/authentication.ts b/server/utils/authentication.ts index 9a01cb26e..c528f3bdf 100644 --- a/server/utils/authentication.ts +++ b/server/utils/authentication.ts @@ -119,7 +119,7 @@ export async function signIn( } } else { ctx.cookies.set("accessToken", user.getJwtToken(), { - sameSite: true, + sameSite: "lax", httpOnly: false, expires, });