Skip to content

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

body(application/json)

{
	"email":"rohinawale331@gmail.com"
}

response

{
    "status": true,
    "message": "Email has been sent for password reset"
}

Note:

  • 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

response

{
    "status": true,
    "data": {
        "id": 1
    }
}

Note:

  • 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

Note:

  • id here is the one returned by /v1/api/users/reset/jwt-token

body(application/json)

{
	"new_password":"mango#123",
	"confirm_password":"mango#123"
}

response

{
    "status": true,
    "message": "Password reset successful"
}
Clone this wiki locally