Skip to content

LG-14814: Entering TOTP code in wrong format shows error text mentioning phone#11521

Merged
aduth merged 1 commit intomainfrom
aduth-lg-14814-totp-error
Nov 18, 2024
Merged

LG-14814: Entering TOTP code in wrong format shows error text mentioning phone#11521
aduth merged 1 commit intomainfrom
aduth-lg-14814-totp-error

Conversation

@aduth
Copy link
Copy Markdown
Contributor

@aduth aduth commented Nov 18, 2024

🎫 Ticket

LG-14814

🛠 Summary of changes

Fixes an issue where entering TOTP (Authentication App) code in the wrong format shows an error message mentioning a code "sent to your phone".

This is related to LG-13450 (#10898), where we changed the error message, intending it to apply for phone-sent codes (OTP via SMS or Voice), but shared code between phone OTP and TOTP caused the error to be used in both places.

The solution here is to restore the shared code instance to use generic language, and override to use the phone-specific languages in those use-cases.

📜 Testing Plan

Verify TOTP invalid format shows generic message:

  1. Prerequisite: Have an account with authentication app as MFA method
  2. Go to http://localhost:3000
  3. Sign in
  4. (If not prompted for MFA, click "Forget all browsers", confirm, sign out, and start from Step 2)
  5. (If not prompted for TOTP as MFA, click "Choose another authentication method", and then select and submit "Authentication app")
  6. Enter code in an invalid format, e.g. "12345" (too few characters)
  7. Submit
  8. See error message "Enter your entire one-time code without spaces or special characters"

Verify no regressions in phone OTP invalid format showing specialized message:

  1. Prerequisite: Have an account with phone as MFA method
  2. Go to http://localhost:3000
  3. Sign in
  4. (If not prompted for MFA, click "Forget all browsers", confirm, sign out, and start from Step 2)
  5. (If not prompted for phone as MFA, click "Choose another authentication method", and then select and submit "Text message")
  6. Enter code in an invalid format, e.g. "12345" (too few characters)
  7. Submit
  8. See error message "Enter the one-time code sent to your phone. Do not use spaces or special characters."

👀 Screenshots

MFA Before After
TOTP image image
Phone image image

…ing phone

changelog: Bug Fixes, Authentication Apps, Fix error code for invalid format mentioning code sent to phone
@aduth aduth merged commit fd0001d into main Nov 18, 2024
@aduth aduth deleted the aduth-lg-14814-totp-error branch November 18, 2024 21:42
@aduth aduth mentioned this pull request Nov 21, 2024
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.

2 participants