-
Notifications
You must be signed in to change notification settings - Fork 13
password reset
Rohin Awale edited this page Jul 16, 2019
·
1 revision
METHOD | ROUTES | DESCRIPTION | ALLOWED USERS |
---|---|---|---|
POST | /v1/api/users/password-reset | allows users to reset password | All Authorized Users |
{
"email":"rohinawale331@gmail.com"
}
{
"status": true,
"message": "Email has been sent for password reset"
}
- email with password reset link is sent to user if that email exists
METHOD | ROUTES | DESCRIPTION | ALLOWED USERS |
---|---|---|---|
GET | /v1/api/users/reset/jwt-token
|
verifies the token's validity | All Authorized Users |
{
"status": true,
"data": {
"id": 1
}
}
- If only user id is return in data the user should be redirect to password reset form
METHOD | ROUTES | DESCRIPTION | ALLOWED USERS |
---|---|---|---|
GET | /v1/api/users/password-reset-done/<int:id>
|
resets the password | All Authorized Users |
- id here is the one returned by
/v1/api/users/reset/jwt-token
{
"new_password":"mango#123",
"confirm_password":"mango#123"
}
{
"status": true,
"message": "Password reset successful"
}