-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Add accountID to the set password link #1857
Conversation
…pensify.cash into jasper-setPasswordEmailLink
For your mobile web screenshot, is there a way we can give the whole page a background color so that we don't have the strange background color block below the form content? |
@shawnborton For sure! I made a new issue since it's not entirely related to what I'm fixing here. I've included more details in the issue. Look out for a PR soon! |
Short answer: No. |
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.
Just have a couple questions so far.
I'm curious if this issue is related: https://github.com/Expensify/Expensify/issues/157873 to this PR? |
Hmm not sure if related.. the error you are seeing there seems to suggest that we have not set the login in credentials. |
Looks like you were able to get to my comment anyways! Thanks :) @chiragsalian |
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.
LGTM, all yours @marcaaron
Is this still on HOLD ? |
@marcaaron, Yes because https://github.com/Expensify/Web-Expensify/pull/30466 isn't live yet. |
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.
Changes LGTM. Leaving this unmerged as I'm not sure when it would be deployed.
c86b93d
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'm a little confused about the title of this PR. Isn't this adding an accountID
to the set password link? The title says it's adding email
to the link.
@jasperhuangg let's add some QA test steps to the description in addition to the local dev steps? |
Co-authored-by: Tim Golen <tgolen@expensify.com>
…o jasper-setPasswordEmailLink
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 LGTM. I tested on iOS and also Android since I noticed we did not test on those platforms. We should let QA know that they can test iOS and Android by clicking on the links with the app installed (at least this should work in theory).
Thanks a lot! Will add a note in the testing instructions 👍 |
Seems like we've resolved comments and need to merge this to fix the broken set password flow.
Details
The
SetPassword
API command requires an email to be provided, along with a new password and a validateCode. For theSetPasswordPage
, we were previously assuming that the email would be read from Onyx storage.However, that may not be the case if we send the user a set password link via a notification, as the user may not have completed the first part of the sign-in flow (which saves their email into Onyx storage). If this is the case, the API call to
SetPassword
will fail since the email sent over will beundefined
.In lieu of the changes in https://github.com/Expensify/Web-Expensify/pull/30466/ and https://github.com/Expensify/Auth/pull/5402, I'm adding an email parameter to the set password route to ensure we're always sending over and reading an email when the user navigates from this page.
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/156786
$ https://github.com/Expensify/Expensify/issues/157873
Tests (local dev)
jasper-ecashValidatePasswordEmail
; on Auth, check out and makejasper-resendValidateCodeSetCashPassword
../script/sql.sh
then:expensify.com.dev/api?command=ResendValidateCode&referer=https://expensify.cash/&accountID=[your accountID]
to queue up a job that will send yourself a set password email.SELECT * from notifications;
and check to make sure there's aSetCashPassword
notification with your accountID queued up in the last row.vssh
andphp /vagrant/Web-Expensify/script/notifyall.php
to send it out.QA Test Steps
here
. Verify that it takes you tohttps://expensify.cash/setpassword/:accountID/:validateCode
Tested On
Screenshots
Web
Mobile Web