Skip to content

The open alternative to Salesforce, designed for AI.

Remove error when new_psw==old_psw (#3637)

martmullb49a8b84db4f
diff --git a/packages/twenty-server/src/core/auth/services/auth.service.ts b/packages/twenty-server/src/core/auth/services/auth.service.ts
index 7d3940219cd..660cd44e0b7 100644
--- a/packages/twenty-server/src/core/auth/services/auth.service.ts
+++ b/packages/twenty-server/src/core/auth/services/auth.service.ts
@@ -259,10 +259,6 @@ export class AuthService {
assert(isPasswordValid, 'Password too weak', BadRequestException);
- const isPasswordSame = await compareHash(newPassword, user.passwordHash);
-
- assert(!isPasswordSame, 'Password cannot be repeated', BadRequestException);
-
const newPasswordHash = await hashPassword(newPassword);
await this.userRepository.update(userId, {