Skip to content

Faster sign-in: stay signed in 90 days, optional password, Face ID / fingerprint (passkeys) - #26

Merged
WhatBoxLLC merged 2 commits into
mainfrom
claude/project-thread-2vw9pz
Nov 29, 2026
Merged

WhatBoxLLC merged 2 commits into
mainfrom
claude/project-thread-2vw9pz

Conversation

@WhatBoxLLC

Copy link
Copy Markdown
Owner

Requested by Jeff Oakes · project thread

What changes for members

  • Stay signed in. Each device stays signed in for 90 days after it was last used (was 30 days from sign-in, then a new code). The apps always remember; on the web there's a "Keep me signed in on this device" box (unticked: 12 hours or until the tab closes). Existing sessions get the 90 days on their next use.
  • Optional password. Settings > Sign-in and security. Sign-in screen gets "Use my password instead". Hashed with argon2id. 5 wrong tries lock it for 15 minutes (doubling, max a day); an emailed code still works and clears the lock. Same error for "no such email" and "wrong password".
  • Face ID / fingerprint (passkeys) on the web: "Sign in with Face ID or fingerprint" button, no email needed. Each site's passkeys belong to its own domain (afterh.com), so they can't be used on another WhatBox site.
  • Gentle offer after a code sign-in for members with neither: "Skip the code next time?" with Face ID, password or "Not now" (hidden 30 days).
  • Devices list with sign out per device, "Sign out all other devices" and "Sign out everywhere". Changing a password signs out other devices.
  • Adding a password or passkey needs a sign-in or code/password confirmation in the last 30 minutes. Every change emails a security notice.
  • The emailed code always works, as fallback and recovery.

Admins

Codes as before; now stay signed in 30 days after last use. "Sign out" now ends the session on the server, plus "Sign out everywhere".

Not in this PR

  • Passkeys in the iPhone/Android apps: needs the Apple Team ID and Android signing key published on each domain, which comes with the app store accounts. The app hides the button; members stay signed in and can use a password.
  • Admin passkeys.

Deploy notes

  • npm run db:migrate adds sessions.doc, a credentials table and two admin_sessions columns (all additive).
  • No new settings needed in prod: passkeys are on by default (PASSKEYS=off hides them). Local dev: PASSKEY_RP_ID=localhost.
  • New API deps: @node-rs/argon2, @simplewebauthn/server; member app: @simplewebauthn/browser.

Testing

  • Core: 12 new tests (sliding expiry, 12-hour sessions, password strength/lockout/no enumeration, reconfirm, devices, passkey tickets single-use and per-site, admin 30 days). 88/88 pass; API tests 13/13; typecheck clean.
  • Smoke test over HTTP against PostgreSQL: password set, wrong/right sign-in, device list, sign out others. Passes.
  • Real browser (Chromium with a virtual authenticator): code sign-in → offer → add passkey → add password → sign out → sign back in with the passkey → sign in with the password.

Generated by Claude Code

…n the web, device list

- Member sessions slide to 90 days after last use (12 hours for 'not my device'); admins 30 days
- Settings > Sign-in and security: password (argon2id, lockout), passkeys (WebAuthn), signed-in
  devices with sign out per device, all other devices, or everywhere
- Gentle offer after a code sign-in; security notice email on every change
- Passwords and passkeys in a separate credentials table, never in the member record

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015x8UvRBohp4Uwx8BacUZGx
@WhatBoxLLC WhatBoxLLC self-assigned this Nov 29, 2026
# Conflicts:
#	packages/core/src/index.ts
@WhatBoxLLC
WhatBoxLLC merged commit 8bddb19 into main Nov 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants