-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Clear login state when account.primaryLogin changes #17812
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
Conversation
|
@fedirjh @aldo-expensify 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] |
|
@mananjadhav @aldo-expensify 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] |
|
On it now |
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.
Reviewer Checklist
Screenshots/VideosWeb & DesktopScreen.Recording.2023-04-22.at.4.45.12.AM.movMobile Web - ChromeMobile Web - SafariiOSSimulator.Screen.Recording.-.iPhone.14.-.2023-04-22.at.05.05.32.mp4AndroidScreen.Recording.2023-04-22.at.5.00.07.AM.mov |
aldo-expensify
left a 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.
Ahh, you can ignore #17812 (review) . This also happens in main
|
@roryabraham Earlier we would reset the email for when we do the same on Login Page also. But now it's persisted BeforeRPReplay_Final1682117012.MP4NowScreen_Recording_20230422_041313_New.Expensify.mp4 |
|
@Santhosh-Sellavel I kind of think the new behavior is better, if you're still on the same screen you were on before and just scroll up, I'm not sure why it would be expected that the login you just entered clears. |
|
Thanks for confirming, makes sense to me as well! |
|
@roryabraham This didn't reset the first time (when users signup) alone. Simulator.Screen.Recording.-.iPhone.14.-.2023-04-22.at.05.15.15.mp4 |
|
@Santhosh-Sellavel I'm not able to reproduce that |
|
@roryabraham an new test account on login for signup. It occurs only first time when it happens. PrimaryLogin is empty in both |
Interesting, yeah It might due to internal dev. |
|
Here is a recording this should help @roryabraham SignupCase.mov |
@roryabraham yeah, I think when the backend sends that "too many writes" error the response comes with an error code or something, so the UI sometimes shows and error that is not real :/. This confused me while testing another flow too. |
|
Okay, after resolving the dev auth write issue, I was still able to reproduce the bug @Santhosh-Sellavel found. Looking for a solution now. |
|
@Santhosh-Sellavel @aldo-expensify fixed: Web.mov |
|
on pressing Go back also now email gets reset now. Screen.Recording.2023-04-26.at.11.49.39.PM.mov |
|
@Santhosh-Sellavel thanks for your thorough testing. I'd again say the new behavior is better / expected. After all, the link you just clicked said |
Some time ago we made it intentional as there may be a little typo, so allowing users to correct mistakes. |
|
Thanks for the context, @Santhosh-Sellavel. I've updated this to preserve the existing behavior for |
|
Thanks, @roryabraham. The login gets cleared again when we get server errors. This buildScreen.Recording.2023-04-28.at.1.56.36.AM.movSimulator.Screen.Recording.-.iPhone.14.-.2023-04-28.at.01.53.55.mp4On Staging same errors login is persistedScreen.Recording.2023-04-28.at.1.58.32.AM.movSorry, couldn't catch this sooner! |
|
np, fixed |
|
This PR looks so simple but ends up being a much-complicated one. We are just running into regressions back and forth. When should we clear & when should we persist the login details?
I performed the following steps and attached the video below
Screen.Recording.2023-04-29.at.12.57.44.AM.mov |
|
You make a good point about how this is inconsistent. Maybe we should just say that for the sake of consistency, and for the same reasons listed here, we should never clear the login. So just close this PR and the linked issue |
|
I thought about auto-selecting the previous login as a convenience in case the user wants to totally change it, but that doesn't work because you can't |
|
Alright, let's close this one, thanks, everyone! |




Details
Clears out the LoginPage state when the primaryLogin of the account in Onyx changes. This happens when you click on
Create New AccountorLog Inin the footer of any of the public pages.Fixed Issues
$ #17811
Tests
Log In.Create New Account.Offline tests
n/a because the login flow uses the blocking form pattern.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
Web
Web.mov
Mobile Web - Chrome
AndroidmWeb.mov
Mobile Web - Safari
iOSmWeb.mov
Desktop
desktop.mov
iOS
iOS.mov
Android
Android.mov