-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent multiple redundant API calls for 2FA #29985
Conversation
Deploying with Cloudflare Pages
|
@mananjadhav 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] |
@MonilBhavsar does this require C+ review? I can see the code change is straightforward. But I don’t have access to the linked issue. |
Reviewer Checklist
Screenshots/VideosWebweb-2fa-enabled-single-api-call.movweb-2fa-disabled-single-api-call.movMobile Web - Chrome-NA-Mobile Web - Safari-NA-Desktop-NA-iOS-NA-Android-NA-I went ahead and reviewed + tested this as it won't assign an internal engineer and this was blocked unless I reviewed. |
@cristipaval 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] |
🎀 👀 🎀 C+ reviewed. |
🎯 @mananjadhav, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #30149. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.90-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.90-2 🚀
|
🚀 Deployed to staging by https://github.com/cristipaval in version: 1.3.91-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
Details
We were making multiple EnableTwoFactorAuth calls in 2 cases and that caused server errors -
<
)This PR stops both not required API calls
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/309850
$ https://github.com/Expensify/Expensify/issues/309849
PROPOSAL: Step 1 mentioned here https://github.com/Expensify/Expensify/issues/309850#issuecomment-1771091242
Tests
Have 2FA disabled and keep Network tab open
EnableTwoFactorAuth
API call is made and codes page is populated. Also visit directly using URL http://localhost:8082/settings/security/two-factor-auth<
) and ensure noEnableTwoFactorAuth
API call is madeEnableTwoFactorAuth
API call is madeOffline tests
None
QA Steps
Internal QA
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
N/A
Android: mWeb Chrome
N/A
iOS: Native
N/A
iOS: mWeb Safari
N/A
MacOS: Chrome / Safari
Screen.Recording.2023-10-19.at.8.08.57.PM.mov
Screen.Recording.2023-10-19.at.8.10.15.PM.mov
MacOS: Desktop
N/A