magento / pwa-studio

🛠Development tools to build, optimize and deploy Progressive Web Applications for Magento 2.
https://developer.adobe.com/commerce/pwa-studio/
Open Software License 3.0
1.06k stars 682 forks source link

[bug]: Forgot Password doesn't send an email #2277

Closed abso-bmarquis closed 3 years ago

abso-bmarquis commented 4 years ago

Describe the bug When submitting a forgot password request, there is nothing posted (no graphql query)

To reproduce Steps to reproduce the behavior:

  1. Go to 'Forgot Password' from
  2. Enter your email
  3. Click on 'Submit'
  4. The form with message 'If there is an account associated with bmarquis@dsafasd.com, you will receive an email with a link to change your password.' but nothing is posted.

Expected behavior Form is posted and an email is sent

Screenshots Screencast: https://drive.google.com/file/d/1hruJJdCxMp1fQqxEAG3z9BHHVugZYZWe/view

Implementation Details

There are two new GraphQL mutations that you'll need to call, both will have a new treatment that will will be provided by UX.

1. requestPasswordResetEmail(email: String!): Boolean

Screen Shot 2020-07-21 at 11 49 26 AM

This view is already built, but the action will need hooked up to this mutation. Upon clicking they will receive an email with a token for the next view. It says it returns a boolean, but I would hope it doesn't confirm that is a known address, it should give the same message regardless if it exists or not.

2. resetPassword(email: String!, resetPasswordToken: String!, newPassword: String!): Boolean

This view will require a form with two inputs for the token and the new password; we can pull the email address from the previous view. After the mutation succeeds, I don't see why we wouldn't just automatically log them in, but we can also return them to the login form to manually log them in (wait for UX on this).

I will confirm what error states we need to handle, which will at least be invalid token or password doesn't adhere to password requirements.

Packages information "@magento/babel-preset-peregrine": "~1.0.1", "@magento/eslint-config": "~1.5.0", "@magento/peregrine": "~5.0.1", "@magento/pwa-buildpack": "~5.0.0", "@magento/upward-js": "~4.0.0", "@magento/venia-ui": "~2.0.1",

Possible solutions Make the graphql call to trigger the email

Please complete the following device information:

Please let us know what packages this bug is in regards to:

dani97 commented 4 years ago

The forget password mutation is not yet available from graphql

larsroettig commented 4 years ago

On hold need the GraphQL mutation. @abso-bmarquis can you created please a ticket at https://github.com/magento/magento2 thank you in advance.

best regards,

Lars

tjwiebell commented 4 years ago

This endpoint has been added to 2.4.0, so we can start supporting this feature with our next release. I've tagged the next release as 8.0.0 for now, but it's possible it will not be a major. Work can start on this feature, but we will not merge into develop until after 7.0.0 has been released (mid-July).

larsroettig commented 4 years ago

@magento I am working on this

revanth0212 commented 4 years ago

Handling this in #2619

abso-bmarquis commented 3 years ago

Working on v8.0.0