Skip to content

[$250] OD sign page instead of ND sign in page #65393

Closed

Description

@jponikarchuk

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: v9.1.74-9
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail: #64786
Email or phone of affected tester (no customers): applausetester+dp222@applause.expensifail.com
Issue reported by: Applause Internal Team
Device used: Windows / Chrome
App Component: Other

Action Performed:

1 . Log out from ND
2. Log in using email and magic code
3. Verify that you end up in ND
4. Move to OD using Switch to Expensify Classic button
5. Log out from OD

Expected Result:

Verify that you end up in ND sign in page

Actual Result:

User ends up in OD page

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021941178709363555412
  • Upwork Job ID: 1941178709363555412
  • Last Price Increase: 2025-07-11
Issue OwnerCurrent Issue Owner: @QichenZhu

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jul 3, 2025
  2. melvin-bot commented on Jul 3, 2025

    @melvin-bot

    Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. MobileMage commented on Jul 3, 2025

    @MobileMage
    Contributor

    Isn't this expected behavior? Looking at the current implementation, when a user logs out from OD and the API returns hasOldDotAuthCookies: true, the code redirects to the OD sign-out page in the same tab:

    if (response?.hasOldDotAuthCookies) {
        Log.info('Redirecting to OldDot sign out');
        asyncOpenURL(
            redirectToSignIn().then(() => {
                Onyx.multiSet(onyxSetParams);
            }),
            `${CONFIG.EXPENSIFY.EXPENSIFY_URL}${CONST.OLDDOT_URLS.SIGN_OUT}`,
            true,
            true, // shouldOpenInSameTab = true
        );
    }

    The issue is that shouldOpenInSameTab is set to true, which overwrites the current page and prevents the user from being redirected to the ND sign-in page. The fix is simple - change this to false so the OD sign-out opens in a new tab while allowing the current tab to redirect to ND sign-in:

    asyncOpenURL(
        redirectToSignIn().then(() => {
            Onyx.multiSet(onyxSetParams);
        }),
        `${CONFIG.EXPENSIFY.EXPENSIFY_URL}${CONST.OLDDOT_URLS.SIGN_OUT}`,
        true,
        false, // shouldOpenInSameTab = false
    );
  4. MobileMage commented on Jul 3, 2025

    @MobileMage
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    When users log out from OD (Expensify Classic), they end up on the OD sign-in page instead of the expected ND (New Expensify) sign-in page.

    What is the root cause of that problem?

    The signOutAndRedirectToSignIn function opens the OD sign-out URL in the same tab when hasOldDotAuthCookies is true. This overwrites the current page and prevents the user from being redirected to the ND sign-in page, even though redirectToSignIn() is called to clear storage and redirect to ND.

    What changes do you think we should make in order to solve the problem?

    Change the shouldOpenInSameTab parameter from true to false in the asyncOpenURL call within signOutAndRedirectToSignIn. This allows the OD sign-out page to open in a new tab while preserving the current tab's ability to redirect to the ND sign-in page.

    What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

    Update the existing test case to verify that shouldOpenInSameTab is false when hasOldDotAuthCookies is true.

    What alternative solutions did you explore? (Optional)

    N/A

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Jul 4, 2025
  6. changed the title [-]OD sign page instead of ND sign in page[/-] [+][$250] OD sign page instead of ND sign in page[/+] on Jul 4, 2025
  7. melvin-bot commented on Jul 4, 2025

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Jul 4, 2025
  9. melvin-bot commented on Jul 4, 2025

    @melvin-bot

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

  10. melvin-bot commented on Jul 8, 2025

    @melvin-bot

    @QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  11. QichenZhu commented on Jul 9, 2025

    @QichenZhu
    Contributor

    Isn't this expected behavior?

    @twisterdotcom, I was wondering that too.

  12. melvin-bot commented on Jul 11, 2025

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  13. twisterdotcom commented on Jul 11, 2025

    @twisterdotcom
    Contributor

    Damn, you're right.

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 contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions