Skip to content

Commit 9d76edf

Browse files
authored
Merge pull request #20383 from mozilla/fxa-13321
feat(passwordless): switch OTP from 8 digits to 6 and harden rate limits
2 parents 9bea644 + 8295bf8 commit 9d76edf

26 files changed

Lines changed: 231 additions & 150 deletions

File tree

libs/accounts/email-renderer/src/renderer/__snapshots__/fxa-email-renderer.spec.ts.snap

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6701,8 +6701,8 @@ exports[`FxA Email Renderer should render renderPasswordlessSigninOtp strapi: ma
67016701
<tr>
67026702
<td align="left" class="text-body" style="font-size:0px;padding:10px 25px;word-break:break-word;">
67036703

6704-
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signin-otp-code">
6705-
Use this confirmation code:
6704+
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signin-otp-code-v2">
6705+
Your verification code is
67066706
</span></div>
67076707

67086708
</td>
@@ -7110,8 +7110,8 @@ exports[`FxA Email Renderer should render renderPasswordlessSigninOtp: matches f
71107110
<tr>
71117111
<td align="left" class="text-body" style="font-size:0px;padding:10px 25px;word-break:break-word;">
71127112

7113-
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signin-otp-code">
7114-
Use this confirmation code:
7113+
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signin-otp-code-v2">
7114+
Your verification code is
71157115
</span></div>
71167116

71177117
</td>
@@ -7515,8 +7515,8 @@ exports[`FxA Email Renderer should render renderPasswordlessSignupOtp strapi: ma
75157515
<tr>
75167516
<td align="left" class="text-body" style="font-size:0px;padding:10px 25px;word-break:break-word;">
75177517

7518-
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signup-otp-code">
7519-
Use this confirmation code:
7518+
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signup-otp-code-v2">
7519+
Your verification code is
75207520
</span></div>
75217521

75227522
</td>
@@ -7924,8 +7924,8 @@ exports[`FxA Email Renderer should render renderPasswordlessSignupOtp: matches f
79247924
<tr>
79257925
<td align="left" class="text-body" style="font-size:0px;padding:10px 25px;word-break:break-word;">
79267926

7927-
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signup-otp-code">
7928-
Use this confirmation code:
7927+
<div style="font-family:Ubuntu, Helvetica, Arial, sans-serif;font-size:13px;line-height:1;text-align:left;color:#000000;"><span data-l10n-id="passwordless-signup-otp-code-v2">
7928+
Your verification code is
79297929
</span></div>
79307930

79317931
</td>

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/en.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ passwordless-signin-otp-subject = Use { $code } to finish sign in
55
passwordless-signin-otp-preview = Code expires in { $codeExpiryMinutes } minutes
66
passwordless-signin-otp-title = Finish your sign in
77
passwordless-signin-otp-request = This email was used to sign in from:
8-
passwordless-signin-otp-code = Use this confirmation code:
8+
passwordless-signin-otp-code-v2 = Your verification code is
99
passwordless-signin-otp-expiry-notice = It expires in { $codeExpiryMinutes } minutes.

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/index.mjml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ can obtain one at http://mozilla.org/MPL/2.0/. %>
2222
<mj-column>
2323

2424
<mj-text css-class="text-body">
25-
<span data-l10n-id="passwordless-signin-otp-code">
26-
Use this confirmation code:
25+
<span data-l10n-id="passwordless-signin-otp-code-v2">
26+
Your verification code is
2727
</span>
2828
</mj-text>
2929

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/index.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313

1414
const data: TemplateData = {
1515
...MOCK_USER_INFO,
16-
code: '96318398',
16+
code: '963183',
1717
codeExpiryMinutes: 10,
1818
supportUrl: 'https://support.mozilla.org',
1919
target: 'index',

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ passwordless-signin-otp-request = "This email was used to sign in from:"
44

55
<%- include('/partials/userInfo/index.txt') %>
66

7-
passwordless-signin-otp-code = "Use this confirmation code:"
7+
passwordless-signin-otp-code-v2 = "Your verification code is"
88

99
<%- code %>
1010

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/strapi.mjml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
<mj-column>
2121

2222
<mj-text css-class="text-body">
23-
<span data-l10n-id="passwordless-signin-otp-code">
24-
Use this confirmation code:
23+
<span data-l10n-id="passwordless-signin-otp-code-v2">
24+
Your verification code is
2525
</span>
2626
</mj-text>
2727

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/strapi.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313

1414
const data: TemplateData = {
1515
...MOCK_USER_INFO,
16-
code: '12345678',
16+
code: '123456',
1717
codeExpiryMinutes: 10,
1818
supportUrl: 'https://support.mozilla.org',
1919
time: '11:45 AM',

libs/accounts/email-renderer/src/templates/passwordlessSigninOtp/strapi.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<%- include('/partials/userInfo/index.txt') %>
66

7-
passwordless-signin-otp-code = "Use this confirmation code:"
7+
passwordless-signin-otp-code-v2 = "Your verification code is"
88

99
<%- code %>
1010

libs/accounts/email-renderer/src/templates/passwordlessSignupOtp/en.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ passwordless-signup-otp-subject = Use { $code } to finish sign up
55
passwordless-signup-otp-preview = Code expires in { $codeExpiryMinutes } minutes
66
passwordless-signup-otp-title = Finish your sign up
77
passwordless-signup-otp-request = An account was created using this email address from:
8-
passwordless-signup-otp-code = Use this confirmation code:
8+
passwordless-signup-otp-code-v2 = Your verification code is
99
passwordless-signup-otp-expiry-notice = It expires in { $codeExpiryMinutes } minutes.

libs/accounts/email-renderer/src/templates/passwordlessSignupOtp/index.mjml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ can obtain one at http://mozilla.org/MPL/2.0/. %>
2222
<mj-column>
2323

2424
<mj-text css-class="text-body">
25-
<span data-l10n-id="passwordless-signup-otp-code">
26-
Use this confirmation code:
25+
<span data-l10n-id="passwordless-signup-otp-code-v2">
26+
Your verification code is
2727
</span>
2828
</mj-text>
2929

0 commit comments

Comments
 (0)