Skip to content

Commit

Permalink
Fix login original url redirect (#445)
Browse files Browse the repository at this point in the history
Signed-off-by: jsetton <jeremy.setton@gmail.com>
  • Loading branch information
jsetton committed Feb 7, 2024
1 parent 498f57c commit 9a2324b
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 @@ -95,7 +95,7 @@ Routes.prototype.setupLoginLogoutRoutes = function (app) {
});

app.post('/login', account_routes.loginpostvalidate,
//use express-form sanitized data for passport
//use express-form sanitized data for passport
function (req, res, next) {
req.body.username = req.form.username;
req.body.password = req.form.password;
Expand All @@ -104,7 +104,8 @@ Routes.prototype.setupLoginLogoutRoutes = function (app) {
passport.authenticate('local', {
successReturnToOrRedirect: '/',
failureRedirect: '/login',
failureFlash: true
failureFlash: true,
keepSessionInfo: true
}));
};

Expand Down

0 comments on commit 9a2324b

Please sign in to comment.