Better login logging
This commit is contained in:
parent
9d71f91e13
commit
14f62ac072
3 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue