feat(passkeys): implement sign-in ceremony on Index and Signin pages#20575
Open
vpomerleau wants to merge 1 commit into
Open
feat(passkeys): implement sign-in ceremony on Index and Signin pages#20575vpomerleau wants to merge 1 commit into
vpomerleau wants to merge 1 commit into
Conversation
878ef7a to
20b8131
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Implements the passkey WebAuthn sign-in ceremony, wiring a new usePasskeySignIn hook into the Index and Signin pages and fixing an auth-server bug in the existing passkey route.
Changes:
- Adds
usePasskeySignInhook owning the WebAuthn ceremony, error categorization (incl. newAbortErrormapping andPASSKEY_NOT_FOUNDbanner), Sync merge gate, account persistence, and post-auth navigation; PII-sanitized Sentry captures. - Wires hook into Index (with
disableAutoSubmitto suppress suggested-email auto-submit on passkey click) and Signin; widensIndexIntegrationand mocks accordingly; mounts/post_verify/passkey/set_password/*for the no-password Sync fallback; hides the button for Sync and cached signin. - Fixes auth-server passkey route to return
sessionToken.data(Hawk key) instead of.id; enablespasskeyAuthenticationEnabledin devlocal.json-dist; adds polyfillassertion()mode and functional tests covering happy/cancel/PASSKEY_NOT_FOUNDpaths.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/fxa-settings/src/lib/passkeys/signin-flow.ts | New hook implementing the full passkey sign-in ceremony |
| packages/fxa-settings/src/lib/passkeys/signin-flow.test.tsx | Unit tests for the hook |
| packages/fxa-settings/src/lib/passkeys/webauthn-errors.ts | Adds AbortError mapping (treated like NotAllowedError) |
| packages/fxa-settings/src/lib/passkeys/webauthn-errors.test.ts | Test coverage for the new AbortError mapping |
| packages/fxa-settings/src/lib/passkeys/en.ftl | New passkey-authentication-error-not-found string |
| packages/fxa-settings/src/pages/Signin/index.tsx | Wires hook; hides button on Sync and cached signin |
| packages/fxa-settings/src/pages/Index/index.tsx | Wires hook; cancels auto-submit before passkey click |
| packages/fxa-settings/src/pages/Index/container.tsx | Plumbs authClient/finishOAuthFlowHandler/disableAutoSubmit |
| packages/fxa-settings/src/pages/Index/interfaces.ts | Widens IndexIntegration with new method picks |
| packages/fxa-settings/src/pages/Index/mocks.tsx | Mock updates for widened integration & new props |
| packages/fxa-settings/src/components/App/index.tsx | Mounts SetPasswordContainer at /post_verify/passkey/set_password/* |
| packages/fxa-content-server/server/config/local.json-dist | Enables passkeyAuthenticationEnabled in dev |
| packages/fxa-auth-server/lib/routes/passkeys.ts | Returns sessionToken.data instead of .id |
| packages/fxa-auth-server/lib/routes/passkeys.spec.ts | Updates assertions for the .data/.id shape |
| packages/functional-tests/lib/passkeyPolyfill.ts | New assertion() mode; passthrough of canonical WebAuthn error names |
| packages/functional-tests/pages/signin.ts | New passkeySigninButton locator; tightens signInButton matcher |
| packages/functional-tests/tests/passkeyAuth/passkey-signin.spec.ts | New functional tests (happy/cancel/PASSKEY_NOT_FOUND) |
| packages/functional-tests/tests/_reference/passkey-virtual-authenticator.spec.ts | Header comment refresh; suite still skipped |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dschom
reviewed
May 15, 2026
dschom
reviewed
May 15, 2026
dschom
reviewed
May 15, 2026
5 tasks
dschom
reviewed
May 15, 2026
Because: We need to wire the passkey WebAuthn ceremony to the passkey button introduced in FXA-13487. This commit: * Adds a usePasskeySignIn hook driving the ceremony, error handling, Sync merge gate, and post-auth routing, and wires it into the Index and Signin pages. * Mounts /signin/passkey/fallback as a temporary stand-in until FXA-13100 lands the real password-fallback page. * Fixes the auth-server passkey route to return sessionToken.data instead of .id so the client can Hawk-sign subsequent requests. * Enables passkeyAuthenticationEnabled in local.json-dist. * Adds functional tests covering the passkey sign-in happy, cancel, and PASSKEY_NOT_FOUND paths. Closes #FXA-13099
bcolsson
approved these changes
May 15, 2026
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.
Because
This pull request
usePasskeySignInhook owning the WebAuthn ceremony, error categorisation, Sync merge gate, account persistence, and post-auth routing. Validates theaccountProfileresponse before relying onemail, and sanitises Sentry captures so server-error responses cannot leak PII.authClientandfinishOAuthFlowHandlerthrough the Index container./signin/passkey/fallbackas a temporary stand-in for FXA-13100; hides the passkey button on Sync entry-points behind the same TODO.PASSKEY_NOT_FOUND(errno 224); does not report to Sentry since it is an expected divergence between server and authenticator state.sessionToken.datainstead of.idso the client can Hawk-sign subsequent requests.passkeyAuthenticationEnabledinlocal.json-dist(dev only; production flag stays off via the convict default).PASSKEY_NOT_FOUNDpaths.Issue that this pull request solves
Closes: FXA-13099
Checklist
Put an
xin the boxes that applyHow to review
packages/fxa-settings/src/lib/passkeys/signin-flow.ts(the hook),packages/fxa-settings/src/pages/{Index,Signin}/(wiring),packages/fxa-auth-server/lib/routes/passkeys.ts(sessionToken fix),packages/functional-tests/tests/passkeyAuth/passkey-signin.spec.ts(new tests).Other information
!integration.isSync(). FXA-13100 will replace the temporarySetPasswordContainermount at/signin/passkey/fallbackwith a container that derives Sync keys viaverifyPasswordAfterPasskey; the Sync button can re-enable then.sessionToken.id → .datachange inpasskeys.tsis a real bug latent in main since5a17be0bb7— every passkey sign-in via the existing route would have failed downstream Hawk-authenticated calls. Worth filing a separate bug to track for backport visibility.