From 17d961db629b7fdd2466c3f04f75e386489daab1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jan 2026 12:48:15 +0530 Subject: [PATCH] logout checking --- app/controllers/auth.controller.js | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/app/controllers/auth.controller.js b/app/controllers/auth.controller.js index 071e379..4cbfa5e 100644 --- a/app/controllers/auth.controller.js +++ b/app/controllers/auth.controller.js @@ -109,18 +109,12 @@ 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: true, - sameSite: "none", - path: "/", - }); + httpOnly: true, + secure: isProd, + sameSite: isProd ? "none" : "lax", + path: "/", + }); return res.status(200).json({ status: "success",