Open nmnandakishore opened 8 years ago
i also like this :(
i also have this problem :((( setting req.flash attributes inside the LocalStrategy callback dont persist in the failure redirect routes. Even with sessions enabled.
I ran into the same issue and it looks like you need to pass the message as a string, or as an object with a property of 'message', as the third parameter of the callback, like:
return done(null, false, "Login failed");
or return done(null, false, "Login failed");
I am trying to display custom error message. I am getting the error message while the login form is incomplete but not when the wrong credentials are provided.
Here are my routes
Here is my strategy
I also tried to return callback as below,
and also like this
But no luck.