-
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
[User Settings] Allow users to add secondary logins #2169
[User Settings] Allow users to add secondary logins #2169
Conversation
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.
Had a couple of comments but overall this is really shaping up 🚀
# Conflicts: # src/pages/settings/ProfilePage/index.js
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.
This is looking super good.
I just realized we're routing users to e.com (through the validation link) instead of to e.cash, which is a little unfortunate. That'll require some changes outside of the E.cash repository to resolve. We'll likely want to pass something like isFromExpensifyCash
in setSecondaryLogin
and resendValidateCode
. I'll take a look at that implementation today/this weekend/monday.
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 great! Added some nabby comments but let's
I have a couple PRs up to route the validation links back to E.cash instead of E.com so no need to hold this one.
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.
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.
Please submit a new PR to fix these
|
||
// Route object from navigation | ||
route: PropTypes.shape({ | ||
params: PropTypes.shape({ |
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.
These are missing inline comments, please add them
Onyx.merge(ONYXKEYS.USER, {error: ''}); | ||
} | ||
|
||
submitForm() { |
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.
Missing method docs
}); | ||
} | ||
|
||
// Determines whether form is valid |
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.
Not valid method docs
|
||
// Login associated with the user | ||
login: PropTypes.shape({ | ||
partnerUserID: PropTypes.string, |
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.
Missing inline comments
this.onResendClicked = this.onResendClicked.bind(this); | ||
} | ||
|
||
onResendClicked() { |
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.
Missing method docs
setAutomaticTimezone(isAutomaticTimezone) { | ||
this.setState(({selectedTimezone}) => ({ | ||
isAutomaticTimezone, | ||
selectedTimezone: isAutomaticTimezone ? moment.tz.guess() : selectedTimezone, | ||
})); | ||
} | ||
|
||
// Get the most validated login of each type |
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.
Invalid method docs
Title: Expected Result:Only Phone number field displayed to add as secondary login Actual Result:Both email and phone number fields are displayed for secondary login Action Performed:
Workaround:Unknown Platform:Where is this issue occurring? Web **Version Number:**1.0.13-0 Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Expensify/Expensify Issue URL: |
@isagoico what is the primary login for this user |
I was able to reproduce this on my test account with the primary log in of "[email protected] / 123456Isa" |
|
Probably related: #2253 |
Ah @Maftalion correctly identified the root cause, which we discussed earlier on but never added into this PR. We need to modify I was able to repro on dev and confirm the fix resolved the issue (for iOS, looking to see if the android whitescreen is related)
|
Forgot to mention above. We were unable execute the steps of this PR in the Android app because of this issue #2253 |
I am not able to reproduce that android whitescreen issue locally Edit: whitescreen issue is resolved |
Details
Fixed Issues
Fixes #2029
Tests
For a user without a secondary login:
To test specific scenarios, you can also stub the data in
getLogins
:QA Steps
same as above
Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android