Files
vitareba/lib/db
g-butandClaude Opus 4.7 20acfb9126 feat(auth): lock account after 5 failed login attempts
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>
2026-04-25 16:08:03 +02:00
..