Skip to content

Commit

Permalink
fixing req.logout() (openhab#406)
Browse files Browse the repository at this point in the history
Signed-off-by: Javaded <[email protected]>
  • Loading branch information
javaded authored Jan 28, 2023
1 parent f525cf7 commit fda9dbb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,9 @@ Routes.prototype.setupGeneralRoutes = function (app) {
};

Routes.prototype.setupLoginLogoutRoutes = function (app) {
app.get('/logout', function (req, res) {
req.logout();
app.get('/logout', function (req, res, next) {
req.logout(function(err) {
if (err) { return next(err); }
res.redirect('/');
});

Expand Down

0 comments on commit fda9dbb

Please sign in to comment.