Skip to content

WIP -Passkey authentication - #27

Open
HaleyMiguel wants to merge 3 commits into
mainfrom
feature/passkeys
Open

WIP -Passkey authentication#27
HaleyMiguel wants to merge 3 commits into
mainfrom
feature/passkeys

Conversation

@HaleyMiguel

Copy link
Copy Markdown

Added scaffolding for passkey deletion and logging in with passskeys from signed-out view

@ottonomy
ottonomy marked this pull request as ready for review October 19, 2025 08:31
ottonomy added a commit that referenced this pull request Jul 10, 2026
Add passkeys as an additional authentication method for all users, and require a
second factor (email + passkey) in the superadmin org when the user has a passkey.

- @simplewebauthn/{server,browser} v13; all verification in a server-only
  src/lib/server/webauthn module (per-org-domain RP ID + full origin, derived per
  request; never hardcoded). Signature counter persisted (clone detection).
- Credentials stored as PASSKEY-type Identifier rows (new Identifier.json holds
  publicKey/counter/transports/deviceType/backedUp/label/lastUsedAt; identifier =
  credentialId) toward a unified identifier model. PASSKEY rows are excluded from all
  contact/identity displays + visibility settings.
- WebAuthn challenge stored on the Session row (single-use, short TTL), closing the
  replay hole; new Session columns passkeyChallenge/passkeyChallengeExpiresAt/
  emailVerifiedAt (additive migration).
- Register + manage passkeys in /settings (add/list/rename/delete). Usernameless
  (discoverable) passkey login. Superadmin org: email code sets emailVerifiedAt and
  defers activation until a passkey assertion at /webauthn/2fa/verify; the two factors
  are bound to one cookie session and neither can be skipped or swapped. Non-superadmin
  orgs and superadmins without a passkey are unchanged (passkey OR email).

Library choice follows the incomplete PR #27; the insecure parts (no server-side
challenge, hardcoded RP, client-side verification, stubbed auth, no counter) were
rebuilt.

ADR: docs/adr/2026-06-13-passkey-webauthn-auth.md
Plan: planning/orca/2026-06-13-passkey-auth/plan.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant