Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: moved user lock reset after backup success

Sheen Capadnganb9a6f94eea18
diff --git a/backend/src/services/auth/auth-password-service.ts b/backend/src/services/auth/auth-password-service.ts
index 8f4e8a6d2b..a400c297b0 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
+ });
};
/*