Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
Can you please resolve the conflict? |
…tle-reset # Conflicts: # tests/unit/ReauthenticationMiddlewareTest.ts
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
|
|
@mountiny conflict resolved |
|
🚧 mountiny 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.5.41-0 🚀
|
|
No help site update needed — this PR fixes unexpected sign-outs by resetting reauthentication retries between flows, restoring expected behavior without adding a feature, changing a workflow, or making existing guidance incorrect. |
|
@sosek108 Step 4 is failing, Unable to see 4 retrying requests. Could you please check what we are missing in the attached video? Grabando.251.mp4 |
|
Hey @sosek108, any update on QA's step 4 question above? QA can't see the 4 retrying requests in their video. |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.5.41-2 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The Reauthentication middleware keeps one module-level
RequestThrottlefor Authenticate retries. Every failed attempt adds to its retry count, but nothing reset the count after a reauth flow finished. Failures added up over the whole app session, so after 10 of them in total the next failed Authenticate signed the user out withREAUTH_FAILEDright away, without retrying, and queued offline writes were lost.The throttle is now cleared when a reauth flow ends, next to where the shared
isAuthenticatingpromise is reset. Every new flow gets the full retry budget again. Clearing it at the end of the flow, not only on success, also covers flows that give up or returnwasSuccessful: false.Fixed Issues
$ #105509
PROPOSAL: N/A
Tests
Re-authenticationapi/Authenticateand enable blockingOnyx.merge('session', {authToken: 'invalid'}), then open another report[RequestThrottle - Re-authentication] Retrying request after errorlines, then turn off request blocking[RequestThrottle - Re-authentication] clearedis loggedRetry countin the retry lines starts again at 1 in every round and you are never signed outOffline tests
Reauthentication does not run while offline, and this change doesn't touch that path. No offline steps.
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)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.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
Nagranie.z.ekranu.2026-11-16.o.14.40.49.mov