Skip to content

Commit

Permalink
login err text change
Browse files Browse the repository at this point in the history
  • Loading branch information
tutaru99 committed May 21, 2021
1 parent 8d8e8f5 commit 3c85c0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/passport.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ function (jwtPayload, cb) {
passport.use(new LocalStrategy({
usernameField: 'email',
passwordField: 'password'
},
},
async function (email, password, cb) {
await user.findOne({ email })
.then(async user => {
if (!user) {
return cb('Incorrect E-mail');
return cb('Incorrect E-mail or Password');
}
const validPassword = await bcrypt.compare(
password,
Expand Down

0 comments on commit 3c85c0c

Please sign in to comment.