Skip to content

Commit

Permalink
replaced logout csrf middlware with flexible csrf
Browse files Browse the repository at this point in the history
  • Loading branch information
singharaj-usai committed Oct 11, 2024
1 parent 9c630ed commit 5097c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/functions/api/routes/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ router.post("/login", flexibleCsrfProtection, authLimiter, async (req, res) => {
});

// Logout endpoint
router.post("/logout", csrfProtection, async (req, res) => {
router.post("/logout", flexibleCsrfProtection, async (req, res) => {
if (req.user) {
await User.findByIdAndUpdate(req.user._id, { isOnline: false });
}
Expand Down

0 comments on commit 5097c65

Please sign in to comment.