-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fixed getting two magic codes upon signing in once #30849
Fixed getting two magic codes upon signing in once #30849
Conversation
@robertKozik 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] |
Hi @samilabud can you add to the test steps to verify that only one magic code is being sent? It was the main problem of the issue so we should include it in test steps |
Of course, is there any similar test that I can see? |
Actually I was thinking about adding additional step, to the ones you have, like "verify that only one magic code..." |
Oh sorry, I was thinking of some unit test using JEST/RTL 😅, I have added this full test in the proposal before, please confirm if this is what you are requesting: After.changes.reduced.mp4 |
Looks we are still not exactly on the same page 😄 In the first comment you have |
Oh my bad, sorry! |
Thanks! Will review the code today |
Hey, were you able to review it? |
yeah right, sorry it slipped through the cracks :( Could you resolve conflicts? I would prioritise reviewing it |
f9eef54
to
88ead66
Compare
Done, thanks! |
d47d043
to
88ead66
Compare
88ead66
to
e9e5bd3
Compare
@robertKozik I believe I addressed all scenarios, please check again. 🙏🏼 |
I'm still encountering problems while account has enabled 2FA. After typing magic link, the text does not changing accordingly when user needs to type authenticator code/recovery code. Can we render the proper section after user typed magic code? |
Hey, could you please share an example regarding text not changing accordingly? Also, what does means proper section in this case? I was doing a test to compare the normal use of magic code and our change and I don't see differences: Normal use: Render.magic.code.as.normal.mp4Our change: Render.proper.section.two.magic.codes.mp4 |
On settings you can enable 2FA (two factor authentication) - while this is enabled after providing magic code, user is obligated to input authenticaton code from external app |
e9e5bd3
to
5a34702
Compare
Good catch!, my bad I didn't know that, is fixed now: Fixed.two.factor.auth.Two.Magic.Codes.mp4Thank you! |
5a34702
to
33af388
Compare
I'm trying to check it, but I'm getting this error when making a build: https://expensify.slack.com/archives/C01GTK53T8Q/p1712782954992479, I let you know when I can fix it 🤓. |
Hi team, please verify again: Test.Two.Magic.code.mp4 |
@samilabud it looks like it's failing lint test |
Thank you @madmax330, it fixed now, please verify 🙏🏼. |
Hi @samilabud! This is now broken again for the case where SAML is enabled. Screen.Recording.2024-04-15.at.5.28.31.PM.movInstead of just pushing the code changes, can you please make sure that the animation works on all three screens (normal login and SSO enabled login)? Thanks! |
Hi, thanks for testing this, sorry for the inconvenience, could you share with me what version of android and resolution you are testing, it seems to be doing fine on Pixel 7 pro (1440x3120): SAML Enabled: Screen.Recording.2024-04-15.at.9.02.14.AM.movNormal Login: Screen.Recording.2024-04-15.at.9.09.51.AM.mov |
I was testing on Chrome with mobile mode enabled. |
Nice this made me see that it was not necessary to have the height of the parent component fixed, these were my tests, please let me know if you see it right: Android Chrome - SAML Enabled: Android.Chrome.-.SAML.Enabled.movAndroid Chrome - SAML Not Enabled Android.Chrome.-.SAML.Not.Enabled.movAndroid Native - SAML Enabled Android.Native.-.SAML.Enabled.movAndroid Native - SAML Not Enabled Android.Native.-.SAML.Not.Enabled.movMAC Chrome - Responsive SAML Enabled MAC.Chrome.-.Responsive.SAML.Enabled.mp4MAC Chrome - Responsive SAML Not Enabled MAC.Chrome.-.Responsive.SAML.Not.Enabled.mp4 |
Looks good now. Thanks for the thorough testing! |
@allroundexperts @robertKozik Looks like the PR reviewer checklist was never completed |
@madmax330 It's complete. You need to delete the incomplete checklist from Robert. |
✋ 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/madmax330 in version: 1.4.63-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
When the user account has SAML enabled and tries to login, the application sends the magic code(like when the user does not have SAML enabled) and displays a form for the user indicating that must select how to be authenticated if using a single sign-on or using magic code, at this point the user has a magic code in the mail but can't be used, so if the user selects the magic code authentication then he will get a second code.
Fixed Issues
$ #30181
PROPOSAL: #30181 (comment)
Tests
Offline tests
N/A
QA Steps
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
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
Single SignOn is only available for web and mweb, see this comment:
https://github.com/Expensify/App/blob/f9eef5480013c7b99340b18e9621edc5a8bf5fbc/src/pages/signin/SignInPage.js#L102
Android: mWeb Chrome
UX.Manual.Test.Chrome.Android.reduced.mp4
iOS: Native
Single SignOn is only available for web and mweb, see this comment:
https://github.com/Expensify/App/blob/f9eef5480013c7b99340b18e9621edc5a8bf5fbc/src/pages/signin/SignInPage.js#L102
iOS: mWeb Safari
UX.Manual.Test.Safari.Iphone.15.mp4
MacOS: Chrome / Safari
UX.Manual.Test.Chrome.Web.reduced.mp4
MacOS: Desktop
UX.Manual.Test.Mac.Desktop.reduced.mp4