Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- passport.use(new LocalStrategy({
- usernameField: 'email',
- passwordField: 'password',
- session: true
- }, function (email, password, done) {
- Account.findOne({email: email}, function(err, res) {
- if (err) { console.log(err); return (done(err.errmsg)); };
- if (!res) { return (done(null, false)) };
- if (res.password != password) { return (done(null, false)); };
- return (done(null, res));
- })
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement