mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-09 09:37:01 +02:00
fix: internal server error if user has no password when trying to sign in
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user