Skip to content

feat(passkeys): Add postRemovePasskey email template#20309

Merged
vpomerleau merged 1 commit intomainfrom
FXA-13368
Apr 9, 2026
Merged

feat(passkeys): Add postRemovePasskey email template#20309
vpomerleau merged 1 commit intomainfrom
FXA-13368

Conversation

@vpomerleau
Copy link
Copy Markdown
Contributor

@vpomerleau vpomerleau commented Apr 2, 2026

Because

  • We want to sent a security notification to users when a passkey is deleted

This pull request

  • 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

Issue that this pull request solves

Closes: FXA-13368

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)

Figma: https://www.figma.com/design/4ToDEuz5HU1HyBrFCIZe4v/Passkeys?node-id=3005-51497&t=gJRBOR7oOXZntqO6-4

@vpomerleau vpomerleau changed the title Fxa 13368 feat(passkeys): Add postRemovePasskey email template Apr 2, 2026
@vpomerleau vpomerleau marked this pull request as ready for review April 7, 2026 21:06
@vpomerleau vpomerleau requested review from a team as code owners April 7, 2026 21:06
Comment thread libs/accounts/email-renderer/src/templates/postAddPasskey/en.ftl Outdated
@vpomerleau vpomerleau force-pushed the FXA-13368 branch 2 times, most recently from 0890bb6 to 88ec5a6 Compare April 8, 2026 20:57
@vpomerleau vpomerleau requested a review from bcolsson April 8, 2026 20:58
Comment thread libs/accounts/email-renderer/src/templates/postRemovePasskey/en.ftl Outdated
Copilot AI review requested due to automatic review settings April 9, 2026 17:45
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 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 postAddPasskey and postRemovePasskey email templates (MJML + TXT) with en-US l10n, plus a new automatedEmailSignIn footer 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.

Comment thread packages/fxa-auth-server/config/index.ts Outdated
Comment thread packages/fxa-auth-server/lib/routes/passkeys.ts
Comment thread packages/fxa-auth-server/lib/senders/fxa-mailer-sanity-check.ts Outdated
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
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

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.

@vpomerleau vpomerleau requested a review from dschom April 9, 2026 21:22
@vpomerleau vpomerleau merged commit 54969c8 into main Apr 9, 2026
25 checks passed
@vpomerleau vpomerleau deleted the FXA-13368 branch April 9, 2026 22: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.

4 participants