Closed HideakiAtsuyo closed 2 years ago
By the way when i use the first function it work perfectly and redirect :)
You aren't actually passing the function to passport:
passport.authenticate('local', {
failureRedirect: "/auth",
failureFlash: true
}), // <-- The `)` closes the `passport.authenticate()` call, so the function below isn't passed as an argument.
function(req, res) {
res.redirect('/chat');
}
To fix it, move the closing parenthesis:
passport.authenticate('local', {
failureRedirect: "/auth",
failureFlash: true
},
function(req, res) {
res.redirect('/chat');
}) // <-- close the function call here
If you have change your failure flash variable name you have to use type in parameters.
Hello so i'm trying to log-in and if the password isn't right it's supposed to tell it
work but
Just make an infinite loading :)
It doesn't even do anything, even if i add a console.log to check it doesn't use it, also how can i get back the message in the new LocalStrategy to use it with req.flash ?