logout checking

This commit is contained in:
unknown 2026-01-22 12:48:15 +05:30
parent d56089f6fc
commit 17d961db62

View File

@ -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",