Skip to content

Commit

Permalink
AUT-3921: Change content for auth app mfa reset with IPV
Browse files Browse the repository at this point in the history
  • Loading branch information
alhcomer committed Jan 14, 2025
1 parent d51b178 commit aec4645
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export function enterAuthenticatorAppCodeGet(

return res.render(templateName, {
isAccountRecoveryPermitted: isAccountRecoveryPermittedForUser,
supportMfaResetWithIpv: supportMfaResetWithIpv(),
mfaResetPath,
});
};
Expand Down
8 changes: 8 additions & 0 deletions src/components/enter-authenticator-app-code/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<input type="hidden" name="_csrf" value="{{csrfToken}}"/>
<input type="hidden" name="isAccountRecoveryPermitted" value="{{isAccountRecoveryPermitted}}"/>
<input type="hidden" name="mfaResetPath" value="{{mfaResetPath}}"/>
<input type="hidden" name="supportMfaResetWithIpv" value="{{supportMfaResetWithIpv}}"/>

{{ govukInput({
label: {
Expand Down Expand Up @@ -42,10 +43,17 @@

{% if isAccountRecoveryPermitted === true or isAccountRecoveryPermitted === "true" %}
{% set detailsHTML %}
{% if supportMfaResetWithIpv === true or supportMfaResetWithIpv === "true" %}
<p class="govuk-body">
{{'pages.enterAuthenticatorAppCode.details.text1MfaResetWithIpv' | translate}}
<a href="{{mfaResetPath}}" class="govuk-link" rel="noreferrer noopener">{{'pages.enterAuthenticatorAppCode.details.text2MfaResetWithIpv'| translate}}</a>{{'pages.enterAuthenticatorAppCode.details.text3' | translate}}
</p>
{% else %}
<p class="govuk-body">
{{'pages.enterAuthenticatorAppCode.details.text1' | translate}}
<a href="{{mfaResetPath}}" class="govuk-link" rel="noreferrer noopener">{{'pages.enterAuthenticatorAppCode.details.text2'| translate}}</a>{{'pages.enterAuthenticatorAppCode.details.text3' | translate}}
</p>
{% endif %}
{% endset %}

{{ govukDetails({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe("enter authenticator app code controller", () => {
"enter-authenticator-app-code/index.njk",
{
isAccountRecoveryPermitted: true,
supportMfaResetWithIpv: false,
mfaResetPath:
PATH_NAMES.CHECK_YOUR_EMAIL_CHANGE_SECURITY_CODES +
"?type=AUTH_APP",
Expand All @@ -88,6 +89,7 @@ describe("enter authenticator app code controller", () => {
"enter-authenticator-app-code/index.njk",
{
isAccountRecoveryPermitted: false,
supportMfaResetWithIpv: false,
mfaResetPath:
PATH_NAMES.CHECK_YOUR_EMAIL_CHANGE_SECURITY_CODES +
"?type=AUTH_APP",
Expand Down Expand Up @@ -123,6 +125,7 @@ describe("enter authenticator app code controller", () => {
UPLIFT_REQUIRED_AUTH_APP_TEMPLATE_NAME,
{
isAccountRecoveryPermitted: true,
supportMfaResetWithIpv: false,
mfaResetPath:
PATH_NAMES.CHECK_YOUR_EMAIL_CHANGE_SECURITY_CODES +
"?type=AUTH_APP",
Expand All @@ -142,6 +145,7 @@ describe("enter authenticator app code controller", () => {
ENTER_AUTH_APP_CODE_DEFAULT_TEMPLATE_NAME,
{
isAccountRecoveryPermitted: true,
supportMfaResetWithIpv: false,
mfaResetPath:
PATH_NAMES.CHECK_YOUR_EMAIL_CHANGE_SECURITY_CODES +
"?type=AUTH_APP",
Expand All @@ -161,6 +165,7 @@ describe("enter authenticator app code controller", () => {
"enter-authenticator-app-code/index.njk",
{
isAccountRecoveryPermitted: true,
supportMfaResetWithIpv: true,
mfaResetPath: PATH_NAMES.MFA_RESET_WITH_IPV,
}
);
Expand Down
2 changes: 2 additions & 0 deletions src/locales/cy/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2505,6 +2505,8 @@
"summary": "Nid oes gennyf fynediad i’r ap dilysydd",
"text1": "Gallwch newid sut ",
"text2": "gallwch gael codau diogelwch yn ddiogel",
"text1MfaResetWithIpv": "Os nad oes gennych fynediad i’ch ap dilysu mwyach, ",
"text2MfaResetWithIpv": "gwiriwch a allwch newid sut rydych yn cael codau diogelwch",
"text3": "."
},
"upliftRequired": {
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2505,6 +2505,8 @@
"summary": "I do not have access to the authenticator app",
"text1": "You can securely ",
"text2": "change how you get security codes",
"text1MfaResetWithIpv": "If you no longer have access to your authenticator app, ",
"text2MfaResetWithIpv": "check if you can change how you get security codes",
"text3": "."
},
"upliftRequired": {
Expand Down

0 comments on commit aec4645

Please sign in to comment.