I am wondering what the difference between passportJS Local and Local-Login is. I have made a system to allow users to update their password via email using passport. However if the user's have NOT changed their passwords ever they cannot log in. Only user's who have changed their password's can login. I think it's because I may be mixing passports strategies somehow.
When I'm first registering a user I'm calling:
passport.authenticate("local")(req, res, function(){
When a user signs in I am calling
app.post('/login', passport.authenticate('local-login', {
And to verrify a user's new password (after they go through a password reset) I'm calling:
passport.use('local-login', new LocalStrategy({
I believe somehow I've mixed up strategies.
via AndrewLeonardi
No comments:
Post a Comment