Skip to content

Commit

Permalink
Redirect fixes to form-auth
Browse files Browse the repository at this point in the history
- Remove additional redirect on session regenerate
- Redirect directly to login page on logout
- Fixes #350
  • Loading branch information
exsilium committed Jul 10, 2023
1 parent b5a79a9 commit cf5daff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions plugins-server/pylon.connect.form-auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ module.exports = function (options, imports, register) {
if (req.sessionStore && !req.sessionStore.regenerate) {
req.session.regenerate = (cb) => {
cb()
return res.redirect('/');
}
}
next();
Expand Down Expand Up @@ -99,7 +98,7 @@ module.exports = function (options, imports, register) {
req.logout(function(err) {
if (err) { return next(err); }
});
res.redirect('/');
res.redirect('/login');
});

}));
Expand Down

0 comments on commit cf5daff

Please sign in to comment.