[HOLD Authentication Refactor] Password sign-in form error not removed after user goes back to email/number - reported by Marion Rosete
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
1.User inputs username and continue to password form 2. User inputs nothing on password form or wrong password which triggers an error message 3. Go back to email/number form 3.input email/password and continue 4. Previous error appears on password form
Expected Result:
Password form error should not appear after user continue to password form
Actual Result:
password error form was present after user continues to password form
Workaround:
unknown
Platform:
Where is this issue occurring?
- Web
- iOS
- Android
- Desktop App
- Mobile Web
Version Number: 1.1.75-0 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Notes/Photos/Videos: Any additional supporting documentation
https://user-images.githubusercontent.com/43995119/173281475-3c89dc20-ddb0-4e42-9e42-93804f817316.mov
Expensify/Expensify Issue URL: Issue reported by: @MarionRosete Slack conversation: View all open jobs on GitHub
Triggered auto assignment to @MitchExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Proposal
Problem
The issue is caused by a state formError as it is retaining its old value even after we revisit the password page and not updating every time as intended here
https://github.com/Expensify/App/blob/0a33d883242c237a903cff5818c67341c7db966b/src/pages/signin/PasswordForm.js#L53-L57
solution
every time the page is rerendered , we should set the state formError to either false or null
as doing so would make the following code execute as intended originally and will eliminate this issue.
https://github.com/Expensify/App/blob/0a33d883242c237a903cff5818c67341c7db966b/src/pages/signin/PasswordForm.js#L170-L180
1
update this piece of code https://github.com/Expensify/App/blob/639a5591c4d21cc2f8bc018e73931ed333e6629a/src/pages/signin/PasswordForm.js#L79-L81 to
clearPassword() {
this.setState({password: ''}, this.inputPassword.clear);
this.setState({formError: false});
}
2
update the name of function clearPassword to clearPasswordAndRemoveFormError
everytime the page is rendered , the clearPassword function is called , here we are clearing the form error with updated fumction so that every time the page is rerendered , the error disappears .
Nice catch and likely a good external candidate, labeling eng to confirm!
Triggered auto assignment to @marcaaron (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.
Since we are in the process of overhauling the API and error messaging by extension I think this should be on HOLD until the Authentication doc is finished.
@mvtglobally, this Monthly task hasn't been acted upon in 6 weeks; closing.
If you disagree, feel encouraged to reopen it -- but pick your least important issue to close instead.
This is on hold and shouldn't be closed yet Melvin
Triggered auto assignment to @CortneyOfstad (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.
Unable to recreate this on my side. Is this still happening @mvtglobally? Please reopen if you continue to see the error/issue on your side!