From 413d15e88754dad9fdc01ad47265d525c207905c Mon Sep 17 00:00:00 2001 From: techbot Date: Tue, 3 Sep 2024 20:30:52 +0200 Subject: [PATCH] fix logout --- src/server/auth.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/server/auth.js b/src/server/auth.js index db02221..5621092 100644 --- a/src/server/auth.js +++ b/src/server/auth.js @@ -93,6 +93,13 @@ module.exports = app => { } }); app.get("/auth/logout", req => { - req.logout(); + req.logout( + (err) => { + if (err) { + return next(err); + } + res.redirect("/"); + } + ) }); };