diff --git a/packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts b/packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts index b75ddf1d84..9db1345181 100644 --- a/packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts +++ b/packages/twenty-server/src/engine/core-modules/auth/services/auth.service.ts @@ -227,6 +227,15 @@ export class AuthService { } if (userData.type === 'existingUser') { + if (!userData.existingUser.passwordHash) { + throw new AuthException( + 'Incorrect login method', + AuthExceptionCode.INVALID_INPUT, + { + userFriendlyMessage: msg`User was not created with email/password`, + }, + ); + } await this.signInUpService.validatePassword({ password: authParams.password, passwordHash: userData.existingUser.passwordHash,