mirror of
https://github.com/bitbaum/vitareba.git
synced 2026-12-05 06:48:03 +01:00
Adds users.failed_login_attempts + users.locked_until columns and enforces a 15-min lockout in the Credentials authorize() handler. Counter resets on successful login or when the lockout fires. Locked accounts are denied silently (same null return as a bad password) to prevent enumeration. Pure helpers in lib/domain/auth.ts cover state transitions; 9 new unit tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>