cookie issue checking
This commit is contained in:
parent
8e30b9fe54
commit
a7b0e874f1
@ -108,9 +108,10 @@ exports.login = async (req, res) => {
|
||||
//logout
|
||||
exports.logout = (req, res) => {
|
||||
try{
|
||||
const isProd = process.env.NODE_ENV === "production";
|
||||
res.clearCookie("auth_token", {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === "production",
|
||||
secure: isProd,
|
||||
sameSite: isProd ? "none" : "lax",
|
||||
});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user