auto-sign in with sign in link in separate browser - #90488
Conversation
|
@DylanDylann Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9b9d213285
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ccdd6e18a5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
trjExpensify
left a comment
There was a problem hiding this comment.
Nice, we talked about this one on the parent issue. 👍
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 859c304e5a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@mukhrr Ohh wait. Could you reproduce the bug on main? |
|
@DylanDylann yes |
| }, []); | ||
|
|
||
| useEffect(() => { | ||
| if (!!login || !cachedAccountID || !is2FARequired) { |
There was a problem hiding this comment.
Why do you remove this condition?
There was a problem hiding this comment.
The condition wasn't removed, it was split across two effects to satisfy Codex's earlier "don't reschedule exitTo" feedback #90488 (comment)
|
|
||
| // The user clicked the option to sign in the current tab | ||
| useEffect(() => { | ||
| if (exitTo || login) { |
There was a problem hiding this comment.
Why do we need the login condition here?
There was a problem hiding this comment.
login being set means this browser initiated the login → there's an original tab, handled by the existing isUserClickedSignIn goBack flow + JustSignedInModal. The HOME redirect must only fire when login is empty (fresh/incognito, no original tab). Without the login guard we'd hijack the normal "head back to your original tab" flow.
|
BUG 1: The white screen is displayed between two loading indicators BUG 2: After signing out, the app returns to the magic code screen Screen.Recording.2026-05-18.at.14.56.04.mov |
Fixed bug 1. working on the 2nd one which is a bit tricky to fix
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
I think the expected behavior is to show enter 2FA code page instead of 2FA required page as link already expired and never able to proceed on first-trying-to-sign-in browser. msafari.movExpected:
This PR:
|
|
I tested as many cases as possible but still be on a look out for any blockers. |
🤖 MelvinBot — regression re-reviewVerdict: No new blocking correctness bugs. Prior review comments look addressed (the 1.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e18daffab5
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
This makes sense to me. Let's just confirm it cc @trjExpensify |
|
Yes, I would think if the user clicks "Just sign in here" and has 2FA enabled, we would then show them the 2FA entry screen prior to navigating into the product. CC: @NikkiWines do you agree with that? |
|
Yep, that makes sense to me 👍 |
|
🚧 @blimpich has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
Oh @blimpich i had not pushed this yet) can I still push here? |
|
Or ideally can we a separate issue for that ? cc @trjExpensify |
|
This PR is now merged, so you can't. Please prepare another PR so we can follow-up with that. 👍 |
Here is it is #93656! cc @mkhutornyi |
|
Ah that's my bad, I misunderstood and thought the behavior had already been implemented and you were just asking for confirmation that it was indeed the correct behavior 🙁 |
|
🚀 Deployed to staging by https://github.com/blimpich in version: 9.4.9-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required I reviewed the changes in this PR against the help site articles under Why This PR is a bug fix for issue #89545 — "Blank page opens when login via magic link different session." The changes are entirely internal navigation/loading behavior:
This restores the already-expected behavior (the user should log in) rather than introducing or changing any user-facing feature, setting, label, or workflow. The existing Login Troubleshooting article documents login problems at the appropriate level and doesn't describe this blank-page bug as expected behavior, so nothing there needs to change. Because no documentation changes are required, I did not open a draft help site PR. @mukhrr, please confirm you agree that no help site changes are needed here. If you believe a doc update is warranted, let me know what behavior should be documented and I'll create the draft PR. |
|
Deploy Blocker #93753 was identified to be related to this PR. |
|
Deploy Blocker #93758 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.4.9-0 🚀
|



Explanation of Change
Fixed Issues
$ #89545
PROPOSAL: #89545 (comment)
Tests
Verify you are in Home page
Verify that no errors appear in the JS console
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
web specific fixAndroid: mWeb Chrome
android_web.mp4
iOS: Native
web specific fixiOS: mWeb Safari
ios_web.mp4
MacOS: Chrome / Safari
web.mp4