From 600186ae42773720fae01b731e1feffc09117bf2 Mon Sep 17 00:00:00 2001 From: Omer Sabic Date: Sun, 21 Jul 2024 17:13:01 +0200 Subject: [PATCH] cookies --- src/routes/auth.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/routes/auth.js b/src/routes/auth.js index 2f0da93..7b820d7 100644 --- a/src/routes/auth.js +++ b/src/routes/auth.js @@ -96,13 +96,13 @@ export const authRoutes = (fastify, _, done) => { } }) - // response.setCookie("token", session_id, { - // httpOnly: false, - // path: "/", - // sameSite: false, - // maxAge: 1000 * 60 * 60 * 24 * 7, - // domain: ".omersabic.com" - // }).redirect(env.FRONTEND_URL); + reply.setCookie("token", session_id, { + httpOnly: true, + path: "/", + sameSite: false, + maxAge: 1000 * 60 * 60 * 24 * 7, + domain: "api.youpage.ai" + }); reply.redirect(env.FRONTEND_URL + "/auth?token=" + session_id);