From b9a6f94eea18c10fd43f027aa648ebe1f5802e60 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Fri, 24 May 2024 23:56:24 +0800 Subject: [PATCH] misc: moved user lock reset after backup success --- backend/src/services/auth/auth-password-service.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 + }); }; /*