1
0
mirror of https://github.com/stonith404/pingvin-share.git synced 2024-11-15 11:50:34 +01:00

fix: internal server error if user has no password when trying to sign in

This commit is contained in:
Elias Schneider 2024-08-25 16:00:49 +02:00
parent 4f9b4f38f6
commit 9c381a2ed6
No known key found for this signature in database
GPG Key ID: 07E623B294202B6C

View File

@ -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}`);
return this.generateToken(user);
}