WIP -Passkey authentication - #27
Open
HaleyMiguel wants to merge 3 commits into
Open
Conversation
ottonomy
marked this pull request as ready for review
October 19, 2025 08:31
ottonomy
force-pushed
the
feature/passkeys
branch
from
November 4, 2025 19:56
71c5298 to
9badfa9
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added scaffolding for passkey deletion and logging in with passskeys from signed-out view