Updated error messages
This commit is contained in:
@ -27,7 +27,7 @@ passport.use(new LocalStrategy({ usernameField: 'email' }, function(email, passw
|
||||
if(isMatch) {
|
||||
return done(null, user);
|
||||
} else {
|
||||
return done(null, false, { message: 'Your username or password is incorrect' });
|
||||
return done(null, false, { message: 'Invalid email or password.' });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -75,11 +75,11 @@ exports.postSignup = function(req, res, next) {
|
||||
var errors = [];
|
||||
|
||||
if (!req.body.email) {
|
||||
errors.push('Email is missing.');
|
||||
errors.push('Email cannot be blank.');
|
||||
}
|
||||
|
||||
if (!req.body.password) {
|
||||
errors.push('Password is missing.');
|
||||
errors.push('Password cannot be blank.');
|
||||
}
|
||||
|
||||
if (req.body.password !== req.body.confirmPassword) {
|
||||
|
Reference in New Issue
Block a user