Skip to content

Account Lockout

Autentico tracks consecutive failed login attempts and locks the account temporarily after a configurable threshold. This limits the effectiveness of brute-force and credential stuffing attacks.

  1. Each failed password attempt increments failed_login_attempts on the user record
  2. When failed_login_attempts reaches lockout_max_attempts, the account is locked by setting locked_until = now + lockout_duration
  3. Login attempts while the account is locked return an error immediately (no password check)
  4. The counter resets to 0 on a successful login
SettingDefaultDescription
lockout_max_attempts5Number of consecutive failures before lockout
lockout_duration15mHow long the account stays locked

Update via Admin UI (Settings) or API:

Terminal window
curl -X PUT https://auth.example.com/admin/api/settings \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"lockout_max_attempts": "10", "lockout_duration": "30m"}'

Locked accounts unlock automatically when locked_until passes. To unlock immediately:

Admin UI: Users → (user) → Unlock

API:

Terminal window
curl -X POST https://auth.example.com/admin/api/users/unlock \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id": "USER_ID"}'

Unlocking resets failed_login_attempts to 0 and clears locked_until.

Account lockout applies to ROPC (Resource Owner Password Credentials) token requests as well as browser-based logins.