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:
parent
4f9b4f38f6
commit
9c381a2ed6
@ -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…
Reference in New Issue
Block a user