cookie issue checking

This commit is contained in:
unknown 2026-01-22 11:25:42 +05:30
parent a7b0e874f1
commit d56089f6fc

View File

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