Skip to content
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

Check for unvalidated accounts and change in password flow #1929

Merged
merged 3 commits into from
Apr 5, 2021

Conversation

chiragsalian
Copy link
Contributor

@chiragsalian chiragsalian commented Mar 19, 2021

HOLD until the web-e and auth PRs go live i.e,

Details

Fixed Issues

Fixes https://github.com/Expensify/Expensify/issues/156783

Tests

  1. On dev first go to ./script/sql.sh and run delete from notifications to begin on a clean slate.
  2. Go to e.cash
  3. Enter your Email. Confirm you see the forgot button,
    image
  4. Click it. For dev run php /vagrant/Web-Expensify/script/notifyall.php from within vssh.
  5. Check the email. Confirm its magic link is of the format <baseUrl>/setpassword/<code>. Don't click it just yet.
  6. Confirm the UI for the existing e.cash tab has updated to be,
    image
  7. Open console. Click "Resend Link" and confirm you see the console log "Account forgot password: Sending reset password link."
  8. Click the link from the email at step 5 and confirm you are redirected to set your password. Set your password and confirm you are logged in. Log out.
  9. Now attempt to log into e.cash using an account that's not validated.
  10. Confirm you are redirected to this UI
    image
  11. Open console and click "Resend link". Confirm you see the log "Account is unvalidated: Sending validation link."
  12. For dev run php /vagrant/Web-Expensify/script/notifyall.php from within vssh. You might have to run update notifications set json = json_set(json(notifications.json), '$.to', '<yourExpensifyEmail>'); if the unvalidated email does not belong to expensify since we only send emails out to expensify.
  13. Check the email and confirm its link is of the format <baseURL>/setpassword/<code>. Click it and confirm you can set your password and you are logged in once done.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@chiragsalian chiragsalian requested a review from a team as a code owner March 19, 2021 18:09
@chiragsalian chiragsalian self-assigned this Mar 19, 2021
@botify botify requested review from pecanoro and removed request for a team March 19, 2021 18:09
@chiragsalian chiragsalian requested a review from a team March 19, 2021 18:54
@botify botify removed the request for review from a team March 19, 2021 18:54
@botify botify requested a review from robertjchen March 19, 2021 18:54
@chiragsalian chiragsalian removed the request for review from robertjchen March 19, 2021 18:54
@chiragsalian
Copy link
Contributor Author

Accidently added pullerbear a second time so i removed robert as reviewer since i think just two would suffice. Manually added stites since i think you may have worked on this flow for e.cash

@pecanoro
Copy link
Contributor

pecanoro commented Mar 19, 2021

Not <email> sounds weird to me hehe, but if that's the copy we chose 🤷‍♀️

@chiragsalian
Copy link
Contributor Author

The related auth code is live and the web-e code is on staging. It should be on production tomorrow and then this PR will be off HOLD.

@chiragsalian chiragsalian changed the title [HOLD for web-E and Auth PRs] Check for unvalidated accounts and change in password flow Check for unvalidated accounts and change in password flow Apr 1, 2021
@chiragsalian
Copy link
Contributor Author

chiragsalian commented Apr 1, 2021

Off HOLD since the related PRs are live. Ready for reviews / merge.

@pecanoro
Copy link
Contributor

pecanoro commented Apr 2, 2021

@stitesExpensify I approved already so it's up to you!

resendValidationLink();
if (!this.props.account.validated) {
resendValidationLink();
console.debug('Account is unvalidated: Sending validation link.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we're printing this to the console? Seems unnecessary IMO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because when you click "resend link" its hard to tell which flow is being called. You can check the network tab for this but its easier with two console.debug as can be seen in test steps 7 and 11. Just makes life easier when you want to debug.

@stitesExpensify stitesExpensify merged commit 735e604 into master Apr 5, 2021
@stitesExpensify stitesExpensify deleted the chirag-notification-for-ecash branch April 5, 2021 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants