Skip to content

Password Authentication

Password authentication is the default auth_mode. Users provide a username and password on the login page, which Autentico validates before issuing an authorization code.

  1. The user is redirected to /oauth2/authorize with the standard OAuth2 parameters
  2. Autentico renders the login page
  3. The user submits their credentials via POST /oauth2/login
  4. Autentico validates the credentials, checks for account lockout, and either:
    • Issues an MFA challenge (if mfa_enabled is true), or
    • Issues an authorization code and redirects back to the client

Passwords are hashed with bcrypt before storage. The plaintext password is never stored or logged.

After a configurable number of consecutive failed login attempts, the account is temporarily locked. See Account Lockout for configuration details.

Username and password validation rules are enforced at registration and can be configured via runtime settings:

SettingDefaultDescription
validation_min_username_length4Minimum username length
validation_max_username_length64Maximum username length
validation_min_password_length6Minimum password length
validation_max_password_length64Maximum password length
validation_username_is_emailfalseRequire username to be a valid email format
validation_email_requiredfalseRequire email field at registration