Skip to content

Commit 9c381a2

Browse files
committed
fix: internal server error if user has no password when trying to sign in
1 parent 4f9b4f3 commit 9c381a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/src/auth/auth.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class AuthService {
7676
},
7777
});
7878

79-
if (user && await argon.verify(user.password, dto.password)) {
79+
if (user?.password && await argon.verify(user.password, dto.password)) {
8080
this.logger.log(`Successful password login for user ${user.email} from IP ${ip}`);
8181
return this.generateToken(user);
8282
}

0 commit comments

Comments
 (0)