mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
fix: internal server error if user has no password when trying to sign in
This commit is contained in:
parent
4f9b4f38f6
commit
9c381a2ed6
1 changed files with 1 additions and 1 deletions
|
@ -76,7 +76,7 @@ export class AuthService {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (user && await argon.verify(user.password, dto.password)) {
|
if (user?.password && await argon.verify(user.password, dto.password)) {
|
||||||
this.logger.log(`Successful password login for user ${user.email} from IP ${ip}`);
|
this.logger.log(`Successful password login for user ${user.email} from IP ${ip}`);
|
||||||
return this.generateToken(user);
|
return this.generateToken(user);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue