feat(passkeys): Add postRemovePasskey email template#20309
Merged
vpomerleau merged 1 commit intomainfrom Apr 9, 2026
Merged
Conversation
bcolsson
requested changes
Apr 7, 2026
0890bb6 to
88ec5a6
Compare
bcolsson
requested changes
Apr 9, 2026
There was a problem hiding this comment.
Pull request overview
Adds passkey lifecycle notification emails (creation + deletion) to FxA, including new email-renderer templates/partials and wiring the auth-server passkey routes to send these emails on successful operations.
Changes:
- Added
postAddPasskeyandpostRemovePasskeyemail templates (MJML + TXT) with en-US l10n, plus a newautomatedEmailSignInfooter partial. - Wired passkey registration finish + passkey deletion routes to send the corresponding notification emails (with tests).
- Extended link-building/config to support new support URLs and a security settings deep link.
Reviewed changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/fxa-auth-server/lib/senders/fxa-mailer.ts | Adds mailer send methods for the new passkey templates and builds required links. |
| packages/fxa-auth-server/lib/senders/fxa-mailer-sanity-check.ts | Adds type-safety “sanity check” invocations for the new mailer methods. |
| packages/fxa-auth-server/lib/routes/passkeys.ts | Sends passkey creation/deletion notification emails on successful operations. |
| packages/fxa-auth-server/lib/routes/passkeys.spec.ts | Adds tests asserting passkey emails are sent/skipped and errors are swallowed. |
| packages/fxa-auth-server/config/index.ts | Adds new SMTP support URL config fields and updates derived SMTP config. |
| packages/fxa-admin-server/src/config/index.ts | Updates/supports new email-link config fields used by the email renderer/link builder. |
| libs/accounts/email-renderer/src/templates/postSigninRecoveryPhone/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/postSigninRecoveryCode/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/postRemoveRecoveryPhone/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/postRemovePasskey/index.txt | Adds plaintext template for “passkey removed” notification. |
| libs/accounts/email-renderer/src/templates/postRemovePasskey/index.ts | Registers metadata/types for postRemovePasskey. |
| libs/accounts/email-renderer/src/templates/postRemovePasskey/index.stories.ts | Adds Storybook story for postRemovePasskey. |
| libs/accounts/email-renderer/src/templates/postRemovePasskey/index.mjml | Adds MJML template for “passkey removed” notification. |
| libs/accounts/email-renderer/src/templates/postRemovePasskey/en.ftl | Adds en-US strings for postRemovePasskey. |
| libs/accounts/email-renderer/src/templates/postChangeRecoveryPhone/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/postAddRecoveryPhone/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/postAddPasskey/index.txt | Adds plaintext template for “passkey created” notification. |
| libs/accounts/email-renderer/src/templates/postAddPasskey/index.ts | Registers metadata/types for postAddPasskey. |
| libs/accounts/email-renderer/src/templates/postAddPasskey/index.stories.ts | Adds Storybook stories for postAddPasskey (with/without Sync note). |
| libs/accounts/email-renderer/src/templates/postAddPasskey/index.mjml | Adds MJML template for “passkey created” notification. |
| libs/accounts/email-renderer/src/templates/postAddPasskey/en.ftl | Adds en-US strings for postAddPasskey. |
| libs/accounts/email-renderer/src/templates/passwordResetRecoveryPhone/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/passwordReset/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/passwordChanged/index.txt | Removes redundant plaintext support footer include. |
| libs/accounts/email-renderer/src/templates/index.ts | Exports the new passkey templates. |
| libs/accounts/email-renderer/src/renderer/fxa-email-renderer.ts | Adds renderer methods for the new passkey templates. |
| libs/accounts/email-renderer/src/renderer/fxa-email-renderer.spec.ts | Adds snapshot coverage for rendering the new templates. |
| libs/accounts/email-renderer/src/renderer/email-link-builder.ts | Adds new support links + buildSecuritySettingsLink, and UTM mappings for new templates. |
| libs/accounts/email-renderer/src/renderer/email-link-builder.spec.ts | Adds unit tests for the new link builder methods. |
| libs/accounts/email-renderer/src/partials/automatedEmailSignIn/index.txt | Adds plaintext footer partial pointing users to security settings/support. |
| libs/accounts/email-renderer/src/partials/automatedEmailSignIn/index.ts | Adds TemplateData type for the new footer partial. |
| libs/accounts/email-renderer/src/partials/automatedEmailSignIn/index.stories.ts | Adds Storybook story for the new footer partial. |
| libs/accounts/email-renderer/src/partials/automatedEmailSignIn/index.mjml | Adds MJML footer partial for automated sign-in/security guidance. |
| libs/accounts/email-renderer/src/partials/automatedEmailSignIn/en.ftl | Adds en-US strings for the new footer partial. |
| libs/accounts/email-renderer/gruntfile.js | Ensures new FTL files are included in the localization build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dschom
reviewed
Apr 9, 2026
dschom
reviewed
Apr 9, 2026
dschom
reviewed
Apr 9, 2026
bcolsson
approved these changes
Apr 9, 2026
Because: * We want to sent a security notification to users when a passkey is deleted This commit: * Adds the new template with MJML and TXT versions, l10n * Wires up the passkey deletion route to send out the email when deletion is successful Closes #FXA-13368
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 14 out of 14 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
dschom
approved these changes
Apr 9, 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
Issue that this pull request solves
Closes: FXA-13368
Checklist
Put an
xin the boxes that applyHow to review (Optional)
Screenshots (Optional)
Please attach the screenshots of the changes made in case of change in user interface.
Other information (Optional)
Figma: https://www.figma.com/design/4ToDEuz5HU1HyBrFCIZe4v/Passkeys?node-id=3005-51497&t=gJRBOR7oOXZntqO6-4