diff --git a/backend/src/services/auth/auth-password-service.ts b/backend/src/services/auth/auth-password-service.ts index 8f4e8a6d2..a400c297b 100644 --- a/backend/src/services/auth/auth-password-service.ts +++ b/backend/src/services/auth/auth-password-service.ts @@ -138,11 +138,6 @@ export const authPaswordServiceFactory = ({ code }); - await userDAL.updateById(user.id, { - isLocked: false, - temporaryLockDateEnd: null - }); - const token = jwt.sign( { authTokenType: AuthTokenType.SIGNUP_TOKEN, @@ -179,6 +174,12 @@ export const authPaswordServiceFactory = ({ salt, verifier }); + + await userDAL.updateById(userId, { + isLocked: false, + temporaryLockDateEnd: null, + consecutiveFailedMfaAttempts: 0 + }); }; /*