Better login logging

This commit is contained in:
Jonathan Cremin 2019-01-19 11:06:14 +00:00
parent 9d71f91e13
commit 14f62ac072
3 changed files with 6 additions and 6 deletions

View file

@ -48,6 +48,7 @@ export async function authenticate(email, password) {
});
if (user && user.password) {
login.userId = user.id;
if (await passwords.verify(password, user.password)) {
debug('Password verified');
login.successful = true;
@ -55,7 +56,6 @@ export async function authenticate(email, password) {
return user;
}
debug('Password invalid');
login.userId = user.id;
}
await login.save();
return false;