Seems to be all working!!

This commit is contained in:
Luke Berndt
2023-04-02 22:27:36 -04:00
parent b8e60ab926
commit efe3794eee
10 changed files with 210 additions and 148 deletions

View File

@@ -26,6 +26,10 @@ const local = new LocalStrategy({
console.error("Auth Error - user not found: " + email);
return done(null, false, { message: `Invalid email or password` })
}
if (!user.confirmEmail) {
console.error("Auth Error - user has not confirmed email: " + email);
return done(null, false, { message: `User's email is not confirmed` })
}
user.comparePassword(password, (err, isMatch) => {
if (isMatch) {
return done(null, user)