Login flows, settings and lockouts
By the end you can
- Choose the right login flow for a device
- Predict which setting wins when it is set at several levels
- Explain the lockout rule and clear a lockout
- Name the risk of password-only and where its use is recorded
Why there is more than one flow
Not every device can show a second prompt. Authcha supports three ways to log in, and you choose per device.
| Flow | How the user logs in | Use it for |
|---|---|---|
| Challenge (default) | Password, then a second prompt for the code | Devices that support the RADIUS Access-Challenge, which is most modern routers, switches and firewalls over SSH |
| Trigger phrase | Type the trigger phrase (default givemeotp) as the password. This sends a code and that login fails once. Then log in again with the code as the password | Devices or clients that cannot show a second prompt |
| Password only | Password alone. No code is sent | Only the rare device that supports neither of the above |
Which setting wins
The auth flow, the code lifetime and the trigger phrase are each resolved independently. Authcha uses the most specific value that is set, in this order:
- The device, on the device dialog
- The device group, under Device Groups
- The vendor default, under Settings → Authentication Policy, per device type
- The global default, under Settings → Authentication Policy
The device dialog shows the effective value for each setting and which level it came from. Changes apply to the next login with no restart. This is the same idea as CSS: the more specific rule beats the general one.
Code lifetime and lockouts
A code stays valid for the code lifetime, 1 hour by default. While it is valid, repeated logins reuse the same code instead of sending a new one, so a user who retries does not get a flood of messages.
After three wrong passwords or three wrong codes, the user is locked out for the rest of the code lifetime. To clear a lockout sooner, run this on the Authcha host:
cd /opt/authcha
docker compose exec redis redis-cli DEL retry:<username> otp_retry:<username>Captive portals use a simpler path
Visitors and staff signing in to a captive portal (pfSense and similar) use a different, simpler path. Add the gateway as a device of type Captive portal / hotspot (PAP) and create users of type network-user. No code, no mobile number, no jump server and no privilege mapping are involved. The Guest and portals track covers this.
LabHands-on
- Open Devices on the demo (viewer login
demo-viewer, passwordAuthcha-View-2026). Open a device and look at the Auth flow field and the effective values it shows. - Open Settings and find Authentication Policy. Note the global default and any vendor defaults.
- Open Device Groups and see whether a group overrides anything.
- On your own install, pick a test device. Set its auth flow to Trigger phrase and its trigger phrase to something else. Confirm that the device dialog now shows the value as coming from the device.
- Clear the device's value and confirm it falls back to the next level up.
- Deliberately type a wrong password three times for a test user. Confirm the lockout, then clear it with the command above.
Check yourselfQuiz
Cheat sheetKeep this
- Flows: Challenge (default), Trigger phrase (
givemeotp), Password only (device-level only). - Resolution order: device, group, vendor default, global default. Each setting is resolved separately.
- A code is valid 1 hour by default and reused while valid.
- Lockout: 3 wrong passwords or codes. Clear with
redis-cli DEL retry:<user> otp_retry:<user>. - Captive portals: device type Captive portal / hotspot (PAP), users of type
network-user. - Read more: Getting started.