Commit graph

1 commit

Author SHA1 Message Date
e96183bba3 Add /api/amber/verify-pin: server-side child-PIN check (#13/#14)
profiles.pinHash is hidden by design (a readable hash = offline brute
force of a 4-digit PIN), which left a device that never saw the PIN set
— the TV signing in after the parent set it on the PC — with nothing to
verify against: the gate always answered "wrong PIN" there. This route
compares the candidate PIN server-side and answers yes/no; the hash
never leaves the server, and failures are rate-limited (5 per 5 minutes
per account+profile, tracked in the shared app store — file-scope state
doesn't survive the per-handler JSVM isolation).

The app mirrors a successful verify into local secure storage, so each
device pays the round-trip once per profile and works offline after.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 21:26:34 +02:00