Skip to content

Commit

Permalink
fix: internal server error if user has no password when trying to sig…
Browse files Browse the repository at this point in the history
…n in
  • Loading branch information
stonith404 committed Aug 25, 2024
1 parent 4f9b4f3 commit 9c381a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9c381a2

Please sign in to comment.