Skip to content

task(settings): passkey registration UI flow#20385

Merged
dschom merged 1 commit intomainfrom
FXA-13072
Apr 22, 2026
Merged

task(settings): passkey registration UI flow#20385
dschom merged 1 commit intomainfrom
FXA-13072

Conversation

@dschom
Copy link
Copy Markdown
Contributor

@dschom dschom commented Apr 16, 2026

Because

  • We want to allow users to register passkeys

This pull request

  • Enables bass key registration on the settings page.

Issue that this pull request solves

Closes: FXA-13072

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

  • In your .env file set FEATURE_FLAGS_PASSKEYS_ENABLED=true and FEATURE_FLAGS_PASSKEY_REGISTRATION_ENABLED=true

  • Start he stack

  • Go to settings page

  • Try adding one more passkeys

  • Try deleting passkeys

  • Suggested review order: Storybooks, Manual Testing

  • Risky or complex parts: I have only really tested this on mac. I'll try to test on adroid and iphone today. I do not have a windows machine to test with, and haven't manually be be able to trip the 'unsupported' state.

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

This PR was done almost entirely by Claude by hooking up the Figma and Jira MCP servers and directing Claude to do the ticket. I've looked over the code, but will be taking a harder look now this is officially up for review. One other minor thing to note, I had to manually add support for deleting the passkey since that was in Figma, but not directly called out in the ticket.

@dschom dschom force-pushed the FXA-13072 branch 7 times, most recently from 6f7e194 to 2c1700c Compare April 16, 2026 23:18
@dschom dschom marked this pull request as ready for review April 17, 2026 15:36
@dschom dschom requested review from a team as code owners April 17, 2026 15:36
@dschom dschom requested a review from vpomerleau April 17, 2026 15:36
@vpomerleau vpomerleau requested a review from Copilot April 17, 2026 16:30
@dschom dschom force-pushed the FXA-13072 branch 2 times, most recently from d0b3abb to f296a7b Compare April 17, 2026 16:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an end-to-end passkey registration UI to the FxA Settings “Security” section, including a new “Create passkey” route guarded by MFA and UI to list existing passkeys.

Changes:

  • Introduces /settings/passkeys/add with an MFA-guarded “ceremony in progress” modal and WebAuthn registration completion.
  • Adds a Passkeys row to the Security section that fetches and renders the user’s passkeys (plus max-limit banner behavior).
  • Extends the Account model with JWT-scoped helpers for starting/finishing passkey registration.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
packages/fxa-settings/src/models/Account.ts Adds JWT-scoped wrappers for begin/complete passkey registration.
packages/fxa-settings/src/components/Settings/index.tsx Registers the MFA-guarded /passkeys/add route behind a feature flag.
packages/fxa-settings/src/components/Settings/Security/index.tsx Shows the Passkeys unit row in the Security section behind a feature flag.
packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.tsx Fetches passkeys via auth-client and renders the Passkeys unit row + subrows.
packages/fxa-settings/src/components/Settings/UnitRow/index.tsx Tweaks CTA rendering logic to allow disabled CTAs to render actions container.
packages/fxa-settings/src/components/Settings/SubRow/index.tsx Updates passkey subrow typing and adds “sign in only” messaging + MFA-guarded delete modal.
packages/fxa-settings/src/components/Settings/PagePasskeyAdd/index.tsx Implements the WebAuthn registration ceremony and success/error handling.
*.test.tsx / *.stories.tsx / *.ftl Updates tests/stories and adds localization strings for the new passkey UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/en.ftl Outdated
Comment thread packages/fxa-settings/src/components/Settings/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/Security/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.test.tsx Outdated
const [passkeys, setPasskeys] = useState<Passkey[]>([]);
const [loading, setLoading] = useState(true);

const fetchPasskeys = useCallback(async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passkey display & delete are basically the whole point of my ticket 😭 The way you did it isn't the best though (see my PR). It's nice to have them for testing registration stuff out, but I recommend not including them when you merge it. Or... you can copy everything from my PR and merge all these in one go 🤔 (in hindsight these two tickets really should be done at the same time by one person, bc they are kinda mutually blocking)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I'll remove this. Then you can rebase on this when it lands.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually how about this. I'll land this PR and then you can replace this gen ai code with whatever you have that is better. It's worth noting that I think the ticket break down is fine. It is noted in the tracker that this ticket is blocking your ticket. We probably should have sequenced the work better.

Comment thread packages/fxa-settings/src/components/Settings/PagePasskeyAdd/en.ftl Outdated
Comment thread packages/fxa-settings/src/components/Settings/PagePasskeyAdd/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/SubRow/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/SubRow/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/PagePasskeyAdd/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/PagePasskeyAdd/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/PagePasskeyAdd/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/SubRow/index.tsx Outdated
const [passkeys, setPasskeys] = useState<Passkey[]>([]);
const [loading, setLoading] = useState(true);

const fetchPasskeys = useCallback(async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passkey display & delete are basically the whole point of my ticket 😭 The way you did it isn't the best though (see my PR). It's nice to have them for testing registration stuff out, but I recommend not including them when you merge it. Or... you can copy everything from my PR and merge all these in one go 🤔 (in hindsight these two tickets really should be done at the same time by one person, bc they are kinda mutually blocking)

Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out the branch and successfully tested the registration flow in local environment. 🙌

Some of the issues I spotted are flagged in my comments or the copilot review.

In addition, I noticed that registration with 1 password fails. Might not be a big deal since production doesn't support extensions but the fix looks to be simple (sent via Slack).

Comment thread packages/fxa-settings/src/models/Account.ts Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.tsx Outdated
@vpomerleau vpomerleau mentioned this pull request Apr 17, 2026
5 tasks
@dschom dschom force-pushed the FXA-13072 branch 2 times, most recently from a943dfb to 3d81170 Compare April 20, 2026 23:51
@dschom
Copy link
Copy Markdown
Contributor Author

dschom commented Apr 20, 2026

@MagentaManifold This ticket is a blocker for your ticket. So it should land first, and then you can rebase and change as needed. I've looked at your PR and it looks good to me. So feel free to make changes as you see fit.

Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Dan! I've added a few comments, but I don't think any are blockers since this is feature flagged and we have more work coming up to finalize. 🚀

Comment thread packages/fxa-settings/src/components/Settings/Security/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.test.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/UnitRowPasskey/index.tsx Outdated
Comment thread packages/fxa-settings/src/components/Settings/SubRow/index.tsx
@dschom dschom force-pushed the FXA-13072 branch 2 times, most recently from 68c91a6 to bbe91b5 Compare April 21, 2026 21:29
@dschom dschom merged commit 8ce913e into main Apr 22, 2026
21 checks passed
@dschom dschom deleted the FXA-13072 branch April 22, 2026 00:20
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.

5 participants