This commit is contained in:
amNobodyyy
2025-01-28 13:02:28 +05:30
parent ef4355dfb8
commit 203666a0da
3 changed files with 3 additions and 3 deletions

View File

@@ -74,7 +74,7 @@ app.get(
const token = jwt.sign({ userId: req.user._id }, process.env.JWT_SECRET, { expiresIn: "1h" });
// Set token as a cookie or send it in the response
res.cookie("token", token, { httpOnly: false, secure: false });
res.redirect("http://localhost:3000/Welcom"); // Redirect to a frontend route after successful login
res.redirect("http://localhost:3000/Welcome"); // Redirect to a frontend route after successful login
}
);