Password Reset - MarcoLagalla/marette_backend GitHub Wiki
For Password Reset we have two endpoints
AskPasswordReset
| Name |
AskPasswordReset |
| Description |
Ask for a password reset token |
| URL |
api/v1/account/password/reset |
| Allowed methods |
POST |
| Authorizations |
AllowAny |
POST
Generate a one-time token that is sent to the email address specified during registration.
| Field |
Type |
Required |
Unique |
Comments |
email |
string |
yes |
yes |
|
Return codes
| Status |
Description |
HTTP_200_OK |
reset email sent |
HTTP_404_NOT_FOUND |
not existing email |
HTTP_400_BAD_REQUEST |
invalid parameters |
ConfirmPasswordReset
| Name |
ConfirmPasswordReset |
| Description |
Provided the right token, change password |
| URL |
api/v1/account/password/reset/confirm |
| Allowed methods |
POST |
| Authorizations |
AllowAny |
POST
Provided the right reset token, allows setting a new password.
| Field |
Type |
Required |
Unique |
Comments |
token |
string |
yes |
yes |
|
password |
string |
yes |
yes |
|
password2 |
string |
yes |
yes |
must match password |
Return codes
| Status |
Description |
HTTP_200_OK |
password changed |
HTTP_404_NOT_FOUND |
invalid reset token |
HTTP_400_BAD_REQUEST |
invalid parameters |