forked from magento/devdocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
magento#7366: GraphQL: Document password change mutations. Mutation: …
…requestPasswordResetEmail. - https://devdocs.magento.com/guides/v2.4/graphql/mutations/revoke-customer-token.html
- Loading branch information
1 parent
de38ab9
commit 618c491
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
63 changes: 63 additions & 0 deletions
63
src/guides/v2.4/graphql/mutations/request-password-reset-email.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
group: graphql | ||
title: requestPasswordResetEmail mutation | ||
contributor_name: Atwix | ||
contributor_link: https://www.atwix.com/ | ||
--- | ||
|
||
The `requestPasswordResetEmail` mutation triggers the password reset email by the provided email address. Use it to initiate a reset password process for the registered customer before [resetPassword]({{page.baseurl}}/graphql/mutations/reset-password.html) mutation call. | ||
|
||
## Syntax | ||
|
||
`mutation: {requestPasswordResetEmail(email: String!): Boolean}` | ||
|
||
## Example usage | ||
|
||
The following call triggers the password reset email. | ||
|
||
**Request:** | ||
|
||
```graphql | ||
mutation { | ||
requestPasswordResetEmail( | ||
email: "roni_cost@example.com" | ||
) | ||
} | ||
``` | ||
|
||
**Response:** | ||
|
||
```json | ||
{ | ||
"data": { | ||
"requestPasswordResetEmail": true | ||
} | ||
} | ||
``` | ||
|
||
Customer will receive an email with an URL to reset a password. | ||
|
||
![Reset password email]({{ page.baseurl }}/graphql/images/reset-password-email.png) | ||
|
||
Example of `Set a New Password` button reset URL: | ||
|
||
``` | ||
https://<MAGENTOSITE>/customer/account/createPassword/?token=gh80pkjGdsPyiXc0sUUXswX1uGN7crUr | ||
``` | ||
|
||
## Input arguments | ||
|
||
Mutation contains a required `email` argument specified an email of customer. | ||
|
||
## Output attributes | ||
|
||
The `requestPasswordResetEmail` mutation returns `true` if reset password operation has been successfully initiated and email with a reset link has been sent. Otherwise returns `false`. | ||
|
||
## Errors | ||
|
||
Error | Description | ||
--- | --- | ||
`Cannot reset the customer's password` | General error message which appears on some internal system errors. The original error is logged and can be found in Magento logs. | ||
`The account is locked` | You cannot modify a locked customer account. | ||
`The email address has an invalid format.` | The value provided in the `email` argument has an invalid format. | ||
`You must specify an email address.` | The empty value is provided in the `email` argument. |