Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG-9872: Add missing interpolation value for personal key alert #8531

Merged
merged 3 commits into from
Jun 5, 2023

Conversation

aduth
Copy link
Member

@aduth aduth commented Jun 2, 2023

🎫 Ticket

LG-9872

Fixes #8443

🛠 Summary of changes

Fixes the notification sent when signing in using Personal Key as the multi-factor authentication method, which previously included the literal %{app_name} rather than "Login.gov".

As a proactive step to try to identify these sorts of issues sooner, the changes also include a monkeypatch to the I18n.t method when tests are run, raising an exception if the result of the translation includes a lingering interpolation variable.

📜 Testing Plan

(Note that this is difficult to test in deployed environments because it relates to a legacy behavior where "personal key" was supported as an MFA method without an existing identity-verified account)

  1. Go to http://localhost:3000/
  2. Create an account
  3. Once account creation is complete, go to http://localhost:3000/verify
  4. Complete identity verification
  5. Download or make a copy of the personal key
  6. When returned to the account dashboard, click "Forget browsers" in the sidebar and confirm
  7. Sign out
  8. In your terminal, open a Rails console with rails console
  9. Delete the identity verified profile by entering User.find_with_email('<email here>').profiles.delete_all (substitute "<email here>" with your chosen email)
  10. Sign in
  11. When prompted for MFA, click "Choose another authentication method"
  12. Click "Personal key"
  13. Click "Continue"
  14. Enter the personal key you copied from the identity verification process
  15. Click "Submit"
  16. Go to http://localhost:3000/test/telephony
  17. Observe that the sent message includes "Login.gov", not "%{app_name}"

changelog: Bug Fixes, Sign-In Alerts, Fix message for personal key MFA sign-in missing "app_name" value
@aduth aduth requested a review from a team June 2, 2023 15:44
Copy link
Member

@matthinz matthinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one possibility for adding a new test

spec/support/i18n_helper.rb Show resolved Hide resolved
Caught by the new spec helper 🙌
@aduth aduth merged commit 88206b2 into main Jun 5, 2023
@aduth aduth deleted the aduth-lg-9872-interpolate-personal-key-app-name branch June 5, 2023 12:25
@solipet solipet mentioned this pull request Jun 6, 2023
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.

Personal key sign-in message does not correctly substitute app name
3 participants