redirect 2FA in incognito while 2FA is enabled#93656
Conversation
|
@mkhutornyi 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: 049d508b5d
ℹ️ 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✅ Changes either increased or maintained existing code coverage, great job!
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Code ReviewReviewed the rewrite of the redirect 1.
|
|
I think neither needs a fix here @mkhutornyi
The second handleExitToNavigation can’t happen. The re-run it describes requires ValidateLoginPage to still be mounted when isSignedIn flips — but it isn’t. The moment canCompleteTwoFactorOnSignIn becomes true, isNavigationReady().then(...) resets the stack to SCREENS.HOME, and SCREENS.HOME (SignInPage) and SCREENS.VALIDATE_LOGIN are sibling routes in the same public RootStack, so the reset removes VALIDATE_LOGIN and unmounts this page — within a microtask of canComplete becoming true. |
navigationRef.isReady() re-check. Agreed this is informational. reset() no-ops gracefully if the container is mid-remount, the “2FA required” modal stays rendered as the fallback, and not re-checking after isNavigationReady() matches the existing convention in Navigation.ts. Combined with the !isSignedIn gate and the unmount above, I’ll leave it as-is to match convention . |
Explanation of Change
Follow-up of #90488
Fixed Issues
$ #89545
PROPOSAL: #90488 (comment)
Tests
Verify you are in 2FA code inserting 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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
REC-20260616091050.mp4