WIP: feat(auth): add passwordless passkey sign-in #412

Draft
Codex wants to merge 1 commit from feat/passwordless-passkey-login into main
Collaborator

Add a “Sign in with passkey” button to the login page. Members with a discoverable passkey registered for the site can choose their account in the device picker and sign in without entering an email, password, or TOTP code. English and French labels and cancellation messages are included.

The public options/verification endpoints require biometric or device PIN verification, verify credential ownership and the WebAuthn proof, and preserve cookie consent and required email verification. Challenges expire after five minutes and are consumed atomically; both endpoints have IP throttles. Success and rejection are audited without retaining credential material or tokens. Password login and existing MFA flows remain available.

Validation: npm test on Node 24 passed: syntax/lint checks, 583 unit tests, 3 contract tests, and 260 integration tests (846 total). New coverage includes real signed WebAuthn assertions, invalid signatures/origins/RPs/user handles, missing user verification, replay, expiry, consent, and client cancellation.

Updated docs/API ROUTES.md and api/schema/openapi.yaml. No new dependencies, permissions, environment variables, or changes to .env.example / docs/CONFIG.md are needed. A new MongoDB collection stores short-lived login challenges with a TTL index; existing user documents need no migration. Existing RP_ID/RP_ORIGIN settings apply. Older non-discoverable security keys can continue using password plus passkey MFA. Physical device/browser passkey testing remains a manual check.

Add a “Sign in with passkey” button to the login page. Members with a discoverable passkey registered for the site can choose their account in the device picker and sign in without entering an email, password, or TOTP code. English and French labels and cancellation messages are included. The public options/verification endpoints require biometric or device PIN verification, verify credential ownership and the WebAuthn proof, and preserve cookie consent and required email verification. Challenges expire after five minutes and are consumed atomically; both endpoints have IP throttles. Success and rejection are audited without retaining credential material or tokens. Password login and existing MFA flows remain available. Validation: `npm test` on Node 24 passed: syntax/lint checks, 583 unit tests, 3 contract tests, and 260 integration tests (846 total). New coverage includes real signed WebAuthn assertions, invalid signatures/origins/RPs/user handles, missing user verification, replay, expiry, consent, and client cancellation. Updated `docs/API ROUTES.md` and `api/schema/openapi.yaml`. No new dependencies, permissions, environment variables, or changes to `.env.example` / `docs/CONFIG.md` are needed. A new MongoDB collection stores short-lived login challenges with a TTL index; existing user documents need no migration. Existing RP_ID/RP_ORIGIN settings apply. Older non-discoverable security keys can continue using password plus passkey MFA. Physical device/browser passkey testing remains a manual check.
feat(auth): add passwordless passkey sign-in
All checks were successful
Tests / Node.js 24 test suite (pull_request) Successful in 3m42s
Validate PR title / Conventional PR title (pull_request) Successful in 2s
648e989bca
bray changed title from feat(auth): add passwordless passkey sign-in to WIP: feat(auth): add passwordless passkey sign-in 2026-10-21 00:42:41 +02:00
All checks were successful
Tests / Node.js 24 test suite (pull_request) Successful in 3m42s
Required
Details
Validate PR title / Conventional PR title (pull_request) Successful in 2s
Required
Details
This pull request has changes conflicting with the target branch.
  • server/public/login.html
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'feat/passwordless-passkey-login:feat/passwordless-passkey-login'
git switch 'feat/passwordless-passkey-login'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Eric/CMCENDev!412
No description provided.