mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-14 11:29:42 +00:00
misc: improved ux by requiring captcha entry before submission
This commit is contained in:
@@ -236,7 +236,7 @@ export const authLoginServiceFactory = ({
|
||||
|
||||
if (!isValidClientProof) {
|
||||
await userDAL.update(
|
||||
{ id: userEnc.id },
|
||||
{ id: userEnc.userId },
|
||||
{
|
||||
$incr: {
|
||||
consecutiveFailedPasswordAttempts: 1
|
||||
@@ -251,6 +251,11 @@ export const authLoginServiceFactory = ({
|
||||
serverPrivateKey: null,
|
||||
clientPublicKey: null
|
||||
});
|
||||
|
||||
await userDAL.updateById(userEnc.userId, {
|
||||
consecutiveFailedPasswordAttempts: 0
|
||||
});
|
||||
|
||||
// send multi factor auth token if they it enabled
|
||||
if (userEnc.isMfaEnabled && userEnc.email) {
|
||||
enforceUserLockStatus(Boolean(user.isLocked), user.temporaryLockDateEnd);
|
||||
|
||||
Reference in New Issue
Block a user