Skip to content

feat(passkey): create passkey management API endpoints#20286

Merged
MagentaManifold merged 1 commit intomainfrom
FXA-13070
Apr 1, 2026
Merged

feat(passkey): create passkey management API endpoints#20286
MagentaManifold merged 1 commit intomainfrom
FXA-13070

Conversation

@MagentaManifold
Copy link
Copy Markdown
Contributor

Because

  • we need passkey management API endpoints

This pull request

  • creates passkey management API endpoints

Issue that this pull request solves

Closes: FXA-13070

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)

  • Key files/areas to focus on:
  • Suggested review order:
  • Risky or complex parts:

Screenshots (Optional)

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

Other information (Optional)

Any other information that is important to this pull request.

@MagentaManifold MagentaManifold requested a review from a team as a code owner March 30, 2026 17:06
Copilot AI review requested due to automatic review settings March 30, 2026 17:06
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 passkey management capabilities to the FxA stack by introducing API endpoints to list, delete, and rename passkeys, and by surfacing passkeys in the account response.

Changes:

  • Add GET /passkeys, DELETE /passkey/{credentialId}, and PATCH /passkey/{credentialId} routes with Swagger docs and unit tests.
  • Update MFA action naming from passkeyspasskey in settings types and auth-server config defaults.
  • Update passkey library renamePasskey to return the updated Passkey record (and adjust tests accordingly).

Reviewed changes

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

Show a summary per file
File Description
packages/fxa-settings/src/lib/types.ts Updates MFA scope type to use passkey (singular).
packages/fxa-auth-server/lib/routes/passkeys.ts Implements new passkey management endpoints.
packages/fxa-auth-server/lib/routes/passkeys.spec.ts Adds/updates unit tests for new passkey routes.
packages/fxa-auth-server/lib/routes/account.ts Includes passkeys in GET /account response payload + schema.
packages/fxa-auth-server/lib/metrics/glean/index.ts Adds commented-out placeholders for passkey delete/rename glean events.
packages/fxa-auth-server/docs/swagger/passkeys-api.ts Adds Swagger docs for list/delete/rename endpoints.
packages/fxa-auth-server/config/index.ts Updates default MFA actions list to passkey.
packages/fxa-auth-server/bin/key_server.js Adjusts passkey config construction call site.
libs/accounts/passkey/src/lib/passkey.service.ts Changes renamePasskey to return a Passkey.
libs/accounts/passkey/src/lib/passkey.service.spec.ts Updates tests for renamePasskey return value and fetch behavior.

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

@MagentaManifold MagentaManifold force-pushed the FXA-13070 branch 3 times, most recently from 169478a to b1447be Compare March 30, 2026 19:28
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.

This looks good to me. I'd be in favour of fixing the encoding issue in this PR (seems like a small fix that doesn't justify a separate ticket and overhead)

this.db.securityEventsByUid({ uid }),
this.db.devices(uid),
listAuthorizedClients(uid),
this.config.passkeys?.enabled
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.

I'm having a doubt here if the stored passkeys should always be returned whether or not the service is enabled, similar to recovery phone 🤔 but this matches the current design

Because:

* we need passkey management API endpoints

This commit:

* creates passkey management API endpoints

Closes FXA-13070
@MagentaManifold MagentaManifold merged commit ef4fc24 into main Apr 1, 2026
22 checks passed
@MagentaManifold MagentaManifold deleted the FXA-13070 branch April 1, 2026 16:57
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.

3 participants