Skip to content

Commit

Permalink
removed sameSite:'none'
Browse files Browse the repository at this point in the history
  • Loading branch information
anirvinv committed Apr 16, 2024
1 parent a6955f7 commit 6262e45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/public/routes/auth_route.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ router.post("/admin/login", (req, res) => __awaiter(void 0, void 0, void 0, func
email: admin.email,
roles: ["admin"],
}, TOKEN_SECRET, { expiresIn: "1h" });
res.cookie("token", token, { expires: new Date(Date.now() + 60 * 60 * 1000), secure: true, sameSite: "none" });
res.cookie("token", token, { expires: new Date(Date.now() + 60 * 60 * 1000), secure: true });
res.status(200).json("Password verified, admin logged in");
}));
/**
Expand Down
2 changes: 1 addition & 1 deletion backend/routes/auth_route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ router.post("/admin/login", async (req, res) => {
roles: ["admin"],
}, TOKEN_SECRET as Secret, { expiresIn: "1h" });

res.cookie("token", token, { expires: new Date(Date.now() + 60 * 60 * 1000), secure: true, sameSite: "none" });
res.cookie("token", token, { expires: new Date(Date.now() + 60 * 60 * 1000), secure: true });
res.status(200).json("Password verified, admin logged in");
});

Expand Down

0 comments on commit 6262e45

Please sign in to comment.