Skip to content

[Due for payment 2026-08-27] [$250] Security - "What's your work email?" window appears briefly after setting up 2FA #98938

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: 9.4.56-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #98756
Email or phone of affected tester (no customers): fischer9966+081826+98519@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: iPhone 17 Pro / 26.6. Google Pixel 5 / Android 14
App Component: User Settings

Action Performed:

  1. Open Expensify app on iOS or Android
  2. Login with Gmail account
  3. Go to Account > Security > Two Factor Authentication (2FA)
  4. Tap to "Download codes"
  5. Enter the 6 digit code from the authenticator app
  6. Tap "Next"
  7. Tap "Got it" on confirmation screen

Expected Result:

The user proceeds to the next screen without the appearance of elements unrelated to the flow.

Actual Result:

After setting up 2FA user proceeds to the next screen after which "What's your work email?" window appears briefly.
Sometimes a screen "Whats your name" may appear instead of "What's your work email?"

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7236811_1787106141715.Android-Whats-your-name-screen-after-2FA.mp4
Bug7236811_1787103005628.98519-iOS.mp4
Bug7236811_1787103005619.98519-Android.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7236811

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

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 19, 2026
  2. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #98756

  3. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    @roryabraham @linhvovan29546 you have been assigned to this deploy blocker because you reviewed the offending PR: #98756

  4. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    @jakubstec you have been assigned to this deploy blocker because you authored the offending PR: #98756

  5. github-actions commented on Aug 19, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. melvin-bot commented on Aug 19, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  7. MelvinBot commented on Aug 19, 2026

    @MelvinBot
    Contributor

    🔍 Investigation Summary

    Classification: Frontend bug
    Causing PR: #94486 - "Required 2FA setup screen is unresponsive, blocking new-domain login and account merge" by @neerajbachani (High confidence)
    Related Issues: The auto-assigned PR #94486 fixes #84246 / addresses the required-2FA-during-onboarding work; the originally-flagged PR #98756 is not the cause (see below).

    Recommendation: ROLL FORWARD

    The regression is a single, well-understood line: DynamicSuccessPage passes a hardcoded false for hasCompletedGuidedSetupFlow, which defeats the only guard in isForced2FAOnboardingSetup and makes the forced-onboarding handoff fire for every user who sets up 2FA via Settings > Security. A one-argument fix resolves it, whereas reverting a 20-file 2FA/onboarding PR is high-risk and would reintroduce the new-domain-login / account-merge blocker that PR fixed. Revert is an acceptable fallback if a fix can't be verified quickly.

    Assigned: @neerajbachani (PR author), @iwiznia and @thelullabyy (approving reviewers) from the causing PR #94486.
    Labels: No changes. This is a Frontend bug, so DeployBlockerCash stays (App deploy is blocked). No DeployBlocker label is present.

    Note on the auto-assignment: melvin-bot assigned #98756 and its author/reviewers (@jakubstec, @roryabraham, @linhvovan29546). #98756 is not the cause — it only touches src/hooks/useIsAgentAccount.ts (a re-render optimization) and a test. It does not touch any onboarding, 2FA-success, navigation, or modal code.

    📋 Detailed Analysis

    Evidence

    Verification

    Root Cause

    The 2FA success page decides whether to hand the user off into the onboarding flow:

    DynamicSuccessPage.tsx#L56-L60

    const isForcedOnboardingHandoff =
        AccountUtils.isForced2FAOnboardingSetup(account, false) ||
        (!!account?.requiresTwoFactorAuth && isIncompleteOnboarding && hasSavedOnboardingPath);
    const shouldReturnToOnboardingAfter2FA = isSecuritySettingsFlow && isForcedOnboardingHandoff;

    isForced2FAOnboardingSetup is AccountUtils.ts#L34-L36:

    function isForced2FAOnboardingSetup(account, hasCompletedGuidedSetupFlow) {
        return !!account?.twoFactorAuthSetupInProgress && hasCompletedGuidedSetupFlow === false;
    }

    The call passes a hardcoded false for hasCompletedGuidedSetupFlow, even though the real value is already computed one line above as the hasCompletedGuidedSetupFlow variable. With the literal false, the guard hasCompletedGuidedSetupFlow === false is always true, so the function collapses to just !!account?.twoFactorAuthSetupInProgress.

    During the reported flow the user taps "Download codes", which sets twoFactorAuthSetupInProgress = true. So when they reach the success page (entered via Settings > Security, i.e. isSecuritySettingsFlow === true):

    • isForced2FAOnboardingSetup(account, false) → true
    • → isForcedOnboardingHandoff → true
    • → shouldReturnToOnboardingAfter2FA → true

    Tapping "Got it" (onButtonPress L98-L100) then runs completeForcedOnboarding2FAHandoff() (L62-L70), which does Navigation.revealRouteBeforeDismissingModal(ROUTES.HOME, { afterTransition: () => resumeOnboardingAfterRequired2FASetup(...) }). That resumes the onboarding flow and briefly flashes "What's your work email?" / "What's your name" before onboarding state settles and dismisses. This happens to every user setting up 2FA from Settings > Security, not just the intended forced-onboarding-during-domain-migration case.

    Suggested fix (roll forward)

    Pass the real value instead of the literal so the guard actually gates on completed onboarding:

    // L59
    AccountUtils.isForced2FAOnboardingSetup(account, hasCompletedGuidedSetupFlow) || ...

    This restores the intended behavior: the handoff fires only for users who have not completed guided setup (the genuine forced-onboarding case). For extra safety, consider dropping the first clause entirely and relying on the second clause (requiresTwoFactorAuth && isIncompleteOnboarding && hasSavedOnboardingPath), whose hasSavedOnboardingPath check already discriminates "arrived from the require-2FA onboarding overlay" from "voluntarily opened Settings > Security". Please re-test the domain-migration / required-2FA-before-onboarding flow after the change.

  8. 6 remaining items

  9. IuliiaHerets commented on Aug 19, 2026

    @IuliiaHerets

    @roryabraham
    Issue not reproducible using ad hoc build v9.4.56-0, PR: 98940.
    Device: iPhone 14/26.6

    ScreenRecording_08-19-2026.13-08-14_1.MP4
    Image

    Issue not reproducible using ad hoc build v9.4.56-0, PR: 98940.
    Device: Samsung A54/android 16

    Image
    2026-08-19.1.17.32.PM.mp4
  10. changed the title [-]Security - "What's your work email?" window appears briefly after setting up 2FA[/-] [+][$250] Security - "What's your work email?" window appears briefly after setting up 2FA[/+] on Aug 19, 2026
  11. melvin-bot commented on Aug 19, 2026

    @melvin-bot
  12. m-natarajan commented on Aug 19, 2026

    @m-natarajan

    Not Repro, Honor x6b / Android 16, iPhone13 / iOS26.6, v9.4.56-2 PR:98989

    document_4913818903068542997.mp4
    ScreenRecording_08-19-2026.17-28-26_1.MP4
  13. m-natarajan commented on Aug 19, 2026

    @m-natarajan

    Not repro, iPhone13 / iOS26.6, v9.4.56-3

    WhatsApp.Video.2026-08-19.at.6.57.48.PM.mp4
  14. Beamanator commented on Aug 19, 2026

    @Beamanator
    Contributor

    great! closing!

  15. changed the title [-][$250] Security - "What's your work email?" window appears briefly after setting up 2FA[/-] [+][Due for payment 2026-08-27] [$250] Security - "What's your work email?" window appears briefly after setting up 2FA[/+] on Aug 20, 2026
  16. melvin-bot commented on Aug 20, 2026

    @melvin-bot

    @linhvovan29546 / @thelullabyy

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.56-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-27. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions