@jmlq/auth 0.0.1-alpha.35 → 0.0.1-alpha.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -36,6 +36,9 @@ class RegisterUserUseCase {
|
|
|
36
36
|
// Use case
|
|
37
37
|
// ---------------------------------------------------------------------------
|
|
38
38
|
async execute(request) {
|
|
39
|
+
// Validar que el password y su confirmación sean iguales
|
|
40
|
+
if (request.password != request.confirmPassword)
|
|
41
|
+
throw new domain_1.PasswordMismatchError();
|
|
39
42
|
// Validar policy antes de hacer trabajo costoso (hash)
|
|
40
43
|
(0, internal_1.assertPasswordPolicy)(this.passwordPolicy, request.password);
|
|
41
44
|
// Verificar que el email no esté en uso
|