From d56089f6fc666c48b7c883ce86d687baef4a1dd2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jan 2026 11:25:42 +0530 Subject: [PATCH] cookie issue checking --- app/controllers/auth.controller.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/controllers/auth.controller.js b/app/controllers/auth.controller.js index 72b6fdb..071e379 100644 --- a/app/controllers/auth.controller.js +++ b/app/controllers/auth.controller.js @@ -109,11 +109,18 @@ exports.login = async (req, res) => { exports.logout = (req, res) => { try{ const isProd = process.env.NODE_ENV === "production"; + // res.clearCookie("auth_token", { + // httpOnly: true, + // secure: isProd, + // sameSite: isProd ? "none" : "lax", + // }); + res.clearCookie("auth_token", { - httpOnly: true, - secure: isProd, - sameSite: isProd ? "none" : "lax", - }); + httpOnly: true, + secure: true, + sameSite: "none", + path: "/", + }); return res.status(200).json({ status: "success",