cookie issue checking
This commit is contained in:
parent
a7b0e874f1
commit
d56089f6fc
@ -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",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user