test commit
This commit is contained in:
parent
7613a5f9b7
commit
9938c4892b
@ -75,9 +75,13 @@ exports.login = async (req, res) => {
|
|||||||
|
|
||||||
// Set token in HTTP-only cookie (IMPORTANT PART)
|
// Set token in HTTP-only cookie (IMPORTANT PART)
|
||||||
res.cookie("auth_token", token, {
|
res.cookie("auth_token", token, {
|
||||||
|
// httpOnly: true,
|
||||||
|
// secure: process.env.NODE_ENV === "production", // true in prod (HTTPS)
|
||||||
|
// sameSite: "lax", // or "strict" if suitable
|
||||||
|
// maxAge: 6 * 60 * 60 * 1000, // 6 hours in ms
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
secure: process.env.NODE_ENV === "production", // true in prod (HTTPS)
|
secure: true,
|
||||||
sameSite: "lax", // or "strict" if suitable
|
sameSite: "none",
|
||||||
maxAge: 6 * 60 * 60 * 1000, // 6 hours in ms
|
maxAge: 6 * 60 * 60 * 1000, // 6 hours in ms
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -167,6 +167,17 @@ router.post("/auth/admin_register",[verifySignature], authController.register);
|
|||||||
*/
|
*/
|
||||||
router.post("/auth/login",[verifySignature], authController.login);
|
router.post("/auth/login",[verifySignature], authController.login);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @swagger
|
||||||
|
* /api/auth/logout:
|
||||||
|
* get:
|
||||||
|
* summary: Logout Admin-user / Establishments-user
|
||||||
|
* tags: [Admin And Establishments User Auth]
|
||||||
|
* security:
|
||||||
|
* - appSignature: []
|
||||||
|
*/
|
||||||
|
router.get("/auth/logout",[verifySignature], authController.logout);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user