amber-backend/pb_hooks
Claude 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
..
device_auth.pb.js fix(device-auth): inline helpers into each hook handler (JSVM scope) 2026-07-19 19:48:03 +02:00
device_page.pb.js device approve page: manual code-entry for the QR-less path (#55) 2026-07-20 11:06:51 +02:00
profile_pin.pb.js Add /api/amber/verify-pin: server-side child-PIN check (#13/#14) 2026-07-21 21:26:34 +02:00
update.pb.js Auto-update backend: releases collection + gated manifest (#16) 2026-07-20 11:36:03 +02:00