Skip to content

[$175] Biometrics-"Request a new code" message display instead Didn't receive a magic code? #102726

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: v9.5.0-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to validate in Prod - Provide reasoning.
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #102137
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Android 16 / Honor x6b
App Component: Other

Action Performed:

Precondition: Device must have a system-level Screen Lock (PIN/Pattern) and Biometrics (Fingerprint or FaceID)

  1. Open the Expensify app
  2. Tap the screen with 4 fingers simultaneously to bring up the hidden Test Tool menu
  3. Locate Biometrics row
  4. Tap "Test" button
  5. Enter the incorrect Magic Code
  6. Verify the error appears and the user stays on the magic code screen (not redirected to the Verification failed screen)
  7. Verify the "Didn't receive a magic code?" option appears and the user can request a new Magic Code and continue the verification

Expected Result:

The “Didn't receive a magic code?” message should be displayed

Actual Result:

“Request a new code” message is shown instead of “Didn't receive a magic code?” message.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7274005_1790818652285.document_5037694062056966663.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7274005

Upwork Automation - Do Not Edit
Issue OwnerCurrent Issue Owner: @suneox

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Oct 1, 2026
  2. applause-bot commented on Oct 1, 2026

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/10e844eb4e5e981d210c8c9de5921c0c0d56582b2f9ec90ff244d58530f677af

  3. MelvinBot commented on Oct 1, 2026

    @MelvinBot
    Contributor

    Issue Analysis

    Root Cause: This is expected behavior, not a regression. The MFA resend button shows "Request a new code" on purpose while a wrong-code error is displayed: ValidateCodeResendButton.tsx:75. Sign-in uses the same logic (BaseValidateCodeForm.tsx:418). The test step in Match the backend Invalid validateCode message so a wrong magic code stays retryable is out of date. Also, no screen says "Didn't receive a magic code?" anymore. That copy is now "Didn't receive a security code?" (en.ts:3431).

    The "Request a new code" link works. Tapping it sends a new code, and the label switches back once you start typing.

    Recommended Fix: Close this issue and update step 7 of the PR's QA steps to: "After the 30-second countdown, verify the Request a new code link appears, and tapping it sends a new code you can use to finish verification."

    If product wants "Didn't receive a security code?" to show even with an error, change ValidateCodeResendButton.tsx:75 to always render translate(resendButtonText). That makes MFA differ from sign-in, so it needs a product decision first.

    Investigation details

    How the label is chosen. The MFA validate code page passes hasError to its own resend button. It doesn't use the shared ValidateCodeActionForm. The resend button behaves like this:

    • For the first 30 seconds (isCountdownRunning starts true), it shows a countdown you can't press: "Request a new code in 00:XX".
    • After the countdown, it shows "Request a new code" if there is an error, or "Didn't receive a security code?" if there isn't.

    Why this only shows up now. Before the PR, a wrong code was stored as a fatal error, which redirected to "Verification failed". After the fix it's stored as a continuableError, so the user stays on the screen. The error-state label is now visible for the first time.

    The label has been intentional since 2023. Fix - modified magic code link redirects to welcome screen with first place of magic code green added it to sign-in. Its test step reads: "Verify that after the error occurred Request a new code is shown instead of Didn't receive magic code". The MFA button copied that logic when it was created.

    Inconsistency to note. The shared ValidateCodeActionForm always shows "Didn't receive a security code?", even with an error. It's used for contact method verification and account merging. MFA matches sign-in, not this form.

    Open question. QA may have seen the 30-second countdown text, not the error-state link. The PR description already lists that countdown as a separate issue. A screenshot would settle it.

    Related issues: [$175] Mobile Biometrics - Enter incorrect Magic Code redirect to verification failed screen (the original bug the PR fixes).


    Next Steps for Contributor+ team:
    To accept: Close this issue and update the QA steps. If product prefers the alternate label, reply @MelvinBot implement [this](https://github.com/Expensify/App/blob/4e2b30d96ac50d36aae5c455b406251e337a9379/src/components/MultifactorAuthentication/ValidateCodeResendButton.tsx#L75) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run

  4. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Oct 1, 2026
  5. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav (External)

  6. changed the title [-]Biometrics-"Request a new code" message display instead Didn't receive a magic code?[/-] [+][$175] Biometrics-"Request a new code" message display instead Didn't receive a magic code?[/+] on Oct 1, 2026
  7. melvin-bot commented on Oct 1, 2026

    @melvin-bot
  8. camesenin commented on Oct 1, 2026

    @camesenin
  9. Julesssss commented on Oct 1, 2026

    @Julesssss
    Contributor
  10. camesenin commented on Oct 1, 2026

    @camesenin
  11. camesenin commented on Oct 1, 2026

    @camesenin
  12. camesenin commented on Oct 1, 2026

    @camesenin
  13. melvin-bot commented on Oct 1, 2026

    @melvin-bot

    ✅ Contributor details stored successfully. Thank you for contributing to Expensify!

  14. suneox commented on Oct 2, 2026

    @suneox
    Contributor

    It looks like the QA step is invalid, so I'll double check shortly.

  15. NikkiWines commented on Oct 2, 2026

    @NikkiWines
    Contributor

    @suneox what's the latest here?

  16. suneox commented on Oct 2, 2026

    @suneox
    Contributor

    The error message Didn't receive a magic code? is no longer available in the source code, and the initial implementation has used request a new code when error. So this is a mistake in the QA test step so we can close this issue and update the test step of PR

  17. melvin-bot commented on Oct 5, 2026

    @melvin-bot

    @suneox Whoops! This issue is 2 days overdue. Let's get this updated quick!

  18. suneox commented on Oct 6, 2026

    @suneox
    Contributor

    @NikkiWines Can I close this issue based on the explanation above?

  19. NikkiWines commented on Oct 6, 2026

    @NikkiWines
    Contributor

    Yep, i see you updated the PR steps, so this is fine to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions