Skip to content

Commit 4fd82bc

Browse files
committed
feat(passkeys): Add postAddPasskey email
Because: * We want to send a security notification to users when a passkey is added to their account This commit: * Add a new email footer partial with action items if the new passkey is unexpected * Add new email template * Sets up email send when passkey registration is successful Closes #FXA-13367
1 parent 731bd32 commit 4fd82bc

22 files changed

Lines changed: 1362 additions & 7 deletions

File tree

libs/accounts/email-renderer/gruntfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
'src/partials/automatedEmailRecoveryKey/en.ftl',
4040
'src/partials/automatedEmailResetPassword/en.ftl',
4141
'src/partials/automatedEmailResetPasswordTwoFactor/en.ftl',
42+
'src/partials/automatedEmailSignIn/en.ftl',
4243
'src/partials/bannerWarning/en.ftl',
4344
'src/partials/brandMessaging/en.ftl',
4445
'src/partials/button/en.ftl',
@@ -81,6 +82,7 @@
8182
'src/templates/passwordResetWithRecoveryKeyPrompt/en.ftl',
8283
'src/templates/postAddAccountRecovery/en.ftl',
8384
'src/templates/postAddLinkedAccount/en.ftl',
85+
'src/templates/postAddPasskey/en.ftl',
8486
'src/templates/postAddRecoveryPhone/en.ftl',
8587
'src/templates/postAddTwoStepAuthentication/en.ftl',
8688
'src/templates/postChangeAccountRecovery/en.ftl',
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
automated-email-sign-in = This is an automated email; if you did not authorize this action, then please <a data-l10n-name="securitySettingsLink">review your account security settings</a>.
2+
For more information, please visit <a data-l10n-name="supportLink">{ -brand-mozilla } Support</a>.
3+
automated-email-sign-in-plaintext = If you did not authorize this action, please review your account security settings at:
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<%# This Source Code Form is subject to the terms of the Mozilla Public
2+
# License, v. 2.0. If a copy of the MPL was not distributed with this
3+
# file, You can obtain one at http://mozilla.org/MPL/2.0/. %>
4+
5+
<mj-section>
6+
<mj-column>
7+
<mj-text css-class="text-footer-automatedEmail">
8+
<span data-l10n-id="automated-email-sign-in">
9+
This is an automated email; if you did not authorize this action, then please
10+
<a class="link-blue" href="<%- securitySettingsLink %>" data-l10n-name="securitySettingsLink">review your account security settings</a>.
11+
For more information, please visit
12+
<a class="link-blue" href="<%- reviewActivitySupportUrl %>" data-l10n-name="supportLink">Mozilla Support</a>.
13+
</span>
14+
</mj-text>
15+
</mj-column>
16+
</mj-section>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
import { Meta } from '@storybook/html';
6+
import { storyWithProps } from '../../storybook-email';
7+
import { includes } from '../mocks';
8+
9+
export default {
10+
title: 'Partials/footers/automatedEmailSignIn',
11+
} as Meta;
12+
13+
const createStory = storyWithProps(
14+
'_storybook',
15+
'This partial is used in footers for automated emails where signing in to review account security settings is recommended.',
16+
{
17+
layout: null,
18+
subject: 'N/A',
19+
partial: 'automatedEmailSignIn',
20+
securitySettingsLink: 'http://localhost:3030/settings#security',
21+
reviewActivitySupportUrl:
22+
'https://support.mozilla.org/kb/review-mozilla-account-activity-and-protect-data',
23+
},
24+
includes
25+
);
26+
27+
export const AutomatedEmailSignIn = createStory();
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/* This Source Code Form is subject to the terms of the Mozilla Public
2+
* License, v. 2.0. If a copy of the MPL was not distributed with this
3+
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4+
5+
export type TemplateData = {
6+
securitySettingsLink: string;
7+
reviewActivitySupportUrl: string;
8+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
automated-email-sign-in-plaintext = "If you did not authorize this action, please review your account security settings at:"
2+
<%- securitySettingsLink %>
3+
4+
automated-email-support-plaintext = "For more info, visit Mozilla Support:"
5+
<%- reviewActivitySupportUrl %>

0 commit comments

Comments
 (0)