Sign-in lockout with console unlock, and forgotten-password reset
All checks were successful
Verify and publish V2 container / build-and-push (push) Successful in 29s

- Wrong passwords in a row are counted across every device and kept in
  the database. The first 3 are free; from the 3rd the next attempt
  waits 15 s, 30 s, 1, 2, 5, 15 and 30 minutes; the 10th locks sign-in
  until the unlock code printed to the server log (and saved to
  unlock-code.txt) is entered. Signed-in devices keep working. Only one
  password check runs at a time, so parallel guesses cannot skip a wait.
- "Forgot password?" prints a reset code to the log (reset-code.txt),
  valid once for 15 minutes. It sets a new password, signs out every
  device, lifts any lockout and signs in. Asking again while a code is
  valid prints nothing new.
- Codes are stored hashed; wrong codes count toward the per-address
  limit. RESET_ADMIN_PASSWORD also lifts a lockout.
- Sign-in page: a live countdown during a wait, an unlock step and a
  reset step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Elijah 2026-11-16 15:46:16 -07:00
parent fe94dbf876
commit 917954d12d
7 changed files with 522 additions and 18 deletions

View file

@ -26,6 +26,10 @@ Open http://localhost:3726. On a fresh install, enter the setup code from the se
`ADMIN_PASSWORD` for first startup. An optional `.env` file is loaded by the server; see
[.env.example](.env.example). Existing environment variables take precedence.
Ten wrong passwords in a row lock sign-in until the unlock code from the server log is entered,
with growing waits after the third. "Forgot password?" prints a reset code to the log instead. See
[sign-in lockout and password reset](docs/DEPLOYMENT.md#sign-in-lockout-and-password-reset).
**This checkout already has an ignored `.env` pointing at `.data/` from development.**
Do not delete it or run reset/seed commands against content you want to keep. The demo seeder
is an opt-in development tool, never part of startup.