Description
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
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 Owner
Current Issue Owner: @QichenZhuMetadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
melvin-bot commentedon Jul 3, 2025
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.MobileMage commentedon Jul 3, 2025
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:The issue is that
shouldOpenInSameTabis set totrue, which overwrites the current page and prevents the user from being redirected to the ND sign-in page. The fix is simple - change this tofalseso the OD sign-out opens in a new tab while allowing the current tab to redirect to ND sign-in:MobileMage commentedon Jul 3, 2025
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
signOutAndRedirectToSignInfunction opens the OD sign-out URL in the same tab whenhasOldDotAuthCookiesis true. This overwrites the current page and prevents the user from being redirected to the ND sign-in page, even thoughredirectToSignIn()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
shouldOpenInSameTabparameter fromtruetofalsein theasyncOpenURLcall withinsignOutAndRedirectToSignIn. 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
shouldOpenInSameTabisfalsewhenhasOldDotAuthCookiesis true.What alternative solutions did you explore? (Optional)
N/A
[-]OD sign page instead of ND sign in page[/-][+][$250] OD sign page instead of ND sign in page[/+]melvin-bot commentedon Jul 4, 2025
Job added to Upwork: https://www.upwork.com/jobs/~021941178709363555412
melvin-bot commentedon Jul 4, 2025
Triggered auto assignment to Contributor-plus team member for initial proposal review - @QichenZhu (
External)melvin-bot commentedon Jul 8, 2025
@QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
QichenZhu commentedon Jul 9, 2025
@twisterdotcom, I was wondering that too.
melvin-bot commentedon Jul 11, 2025
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
twisterdotcom commentedon Jul 11, 2025
Damn, you're right.