Skip to content

Commit

Permalink
cookies issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhinav Dixit authored and Abhinav Dixit committed Nov 23, 2024
1 parent 19284c5 commit 046fb35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ authRouter.post("/login", async (req, res) => {
sameSite: 'None', // Required for cross-origin
expires: new Date(Date.now() + 8 * 3600000),
});
console.log(req.cookies);
res.send(user);
} else {
throw new Error("Invalid credentials");
Expand All @@ -69,7 +70,10 @@ authRouter.post("/logout", async (req, res) => {
sameSite: 'None', // Required for cross-origin
expires: new Date(Date.now()),
});
console.log(req.cookies);

res.send("Logout Successful!!");
});


module.exports = authRouter;

0 comments on commit 046fb35

Please sign in to comment.