-
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
fix: 2FA bug fixes #19260
fix: 2FA bug fixes #19260
Conversation
@MonilBhavsar @mananjadhav One of you needs to 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍 Thanks!
@mananjadhav would like to get your review here and finish the checklist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes are fine, I'll test on all platforms and update the checklist.
Reviewer Checklist
Screenshots/Videos |
@MonilBhavsar @BeeMargarida Is the Two Factor Screen loading for you on Android and iOS? On Android it is abruptly crashing for me without any errors. android-crash.movOn iOS I get an exception first, and if I dismiss I see the screen. Also on iOS I am unable to enter the 2fa code. ios-stickey-keys.mov |
I'm seeing it too 😭 |
@MonilBhavsar Looking into it now! |
These two ⬆️ were caused by a little issue, incorrectly setting a style. I'm contacting Ana to get permissions to push to her branch.
This one is a known bug, unrelated to 2-FA. Happens only on iOS 16.4, on simulator, in dev mode. See the related issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonilBhavsar I've finished the checklist. The android tests work fine now.
I've bypassed the iOS issue by pasting the code, instead of typing in.
@thiagobrez I see the view being disrupted bug on samsung galaxy fold. I think we still need to fix it. Could you please take look, thanks! |
Ohh yeah 🤦. Thanks for catching @MonilBhavsar |
Great catch @MonilBhavsar, thanks! I didn't know it was supported, I'll keep an eye next time 🙇🏻 I added a new breakpoint for extra small screens like this. I'm using |
Thanks for fixing this! The view looks good now, but looks like user can't see continue button. I wonder should we use ScrollView in codespage |
Thanks @MonilBhavsar! Fixed ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Is this file really needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just merged main
and installed dependencies. I guess in some other PR the dependencies were updated but the lockfile wasn't pushed
Thanks! @mananjadhav could you please help to review and test latest scroll view change. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested the CodePages ScrollView.
borderRadius: 16, | ||
marginTop: 32, | ||
twoFactorAuthCodesBox: ({isExtraSmallScreenWidth, isSmallScreenWidth}) => { | ||
let paddingHorizontal = styles.ph15; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawnborton buddy check please for these new style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exactly am I reviewing here? Just the screenshots from the first comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, Nothing has changed much in the view. I wanted to get an eye on padding prooerty we added to support view for extra small devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah got it. Can you show me screenshots of what this looks like in practice please? Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawnborton Here you go:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay cool, that works for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks shawn!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good to me
🚀 Deployed to staging by https://github.com/MonilBhavsar in version: 1.3.23-3 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.23-7 🚀
|
1 similar comment
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.23-7 🚀
|
Heads up, this PR added this regression |
{currentAuthState === CONST.AUTO_AUTH_STATE.FAILED && <ExpiredValidateCodeModal />} | ||
{currentAuthState === CONST.AUTO_AUTH_STATE.JUST_SIGNED_IN && is2FARequired && !isSignedIn && <TfaRequiredModal />} | ||
{currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && isSignedIn && <AbracadabraModal />} | ||
{currentAuthState === CONST.AUTO_AUTH_STATE.NOT_STARTED && !isSignedIn && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BeeMargarida Do you remember why we had to add the !isSignedIn
condition here? This caused a regression #21258
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@s77rt Yes, it came from this commit to fix this bug mentioned in this slack thread.
Before, it was necessary because the check for AbracadabraModal
(now JustSignedInModal
) used NOT_STARTED
state (this is because the state was cleaned on startup - mentioned in the proposal), so we needed to differentiate between that one and the one for ValidateCodeModal
. At the time, the only difference was that for the abracadabra, the isSignedIn
was true and false for the ValidateCodeModal
.
I don't think it was a regression from here specifically, since this changed a lot after this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BeeMargarida Thank you!
<FixedFooter style={[styles.twoFactorAuthFooter]}> | ||
<Button | ||
success | ||
text={props.translate('common.next')} | ||
onPress={() => Navigation.navigate(ROUTES.SETTINGS_2FA_VERIFY)} | ||
isDisabled={isNextButtonDisabled} | ||
/> | ||
</FixedFooter> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems we accidentally included FixedFooter inside scroll containers and that led to this regression #20138
Details
Fix several small issues related with 2FA.
Offline Indicator displayed twice https://expensify.slack.com/archives/C049HHMV9SM/p1684408727072029Fixed Issues
$ #19187
#19187 (comment)
Tests
Problem 1:
Problem 2:
Problem 4:
Problem 5:
Problem 6:
Offline tests
Do not apply for these specific issues, the only one that should affect won't be solved in this PR.
QA Steps
Problem 1:
Problem 2:
Problem 4:
Problem 5:
Problem 6:
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
Web
Problem 1:
Problem 2:
Problem 4:
web.mp4
Problem 5 and 6:
web1.mp4
Mobile Web - Chrome
Problem 6:
Mobile Web - Safari
Problem 6:
Desktop
iOS
Problem 6:
Android
Problem 6: