-
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
Make the NewDot login flow work with domain-controlled accounts #5218
Conversation
Setting @nickmurray47 as reviewer, since he has been assigned to the web PR counterpart |
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.
See my comment in web 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.
Tested with https://github.com/Expensify/Web-Expensify/pull/31898, works well!
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.
also LGTM and tests well
All yours, @iwiznia! |
accountID, | ||
validateCode, | ||
}).then((responseValidate) => { | ||
if (responseValidate.jsonCode === 200) { |
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.
No error message if this fails?
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.
And if the ValidateEmail
call fails.. what is the user supposed to do?
Another thought, if the validate code is bad why make them enter a password at all?
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.
- Hmmm. Ask for another code, I imagine?
- Mainly because we don't know yet π. What are you thinking? Calling validate on page load, for example? That would probably work.
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.
Ask for another code, I imagine?
Ahaha asking because when I ran through this flow I just get stuck looking at an error message with no buttons or anything.
Calling validate on page load, for example? That would probably work.
Sure, this is what we do on OldDot.
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.
We can create another issue to nail these two down, if you want. I think validating on load makes sense and would make the flow a bit better, and if validation fails, we can display the error and a button/link to resend the magic link?
I don't think we need them to go live with N6, but they seem like good improvements
password: this.state.password, | ||
}).then((responsePassword) => { | ||
if (responsePassword.jsonCode === 200) { | ||
signIn(this.state.password); |
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.
Why do we need to call signIn? Is it because validate and changePassword do not set the authToken cookie or what?
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.
Yep. SignIn sets the cookie and redirects us to where we want to go, I believe
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 don't think there are any cookies in New Expensify. We mostly need to do this to create the "device login" to make the re-authentication logic work correctly.
a9bdce2
Added error messages! |
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.
@iwiznia all yours once again! |
β This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
lodashGet(this.props.route, 'params.validateCode', ''), | ||
lodashGet(this.props.route, 'params.accountID', ''), | ||
); | ||
API.ValidateEmail({ |
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 am pretty sure this broke the page for when the account is already validated... The API returns 405 Account already validated
.
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.
It was already broken anyways, another issue will be created https://expensify.slack.com/archives/C020EPP9B9A/p1632155251298000?thread_ts=1631926252.186300&cid=C020EPP9B9A
@Gonals @marcaaron @flodnv What environments should we verify this PR? |
Hey! This should be tested in staging. |
@nickmurray47 π»ββοΈ
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/176617#
Tests
./script/clitools.sh generator:account
, then run./script/clitools.sh generator:domain
to generate a domain with it as its admin.DEV_EMAILS
const in _.config.local.php.vssh php ./Web-Expensify/script/notifyall.php
.<baseURL>/setpassword/<accountID>/<validateCode>
.QA Steps
new.expensify.com/setpassword/<accountID>/<validateCode>
. If it isn't, just change it to that format.Tested On
Screenshots
Web
Mobile Web
Desktop
iOS
Android