Resetting a user's password
API BaaS provides a standard password reset flow that can be implemented to allow a user to reset their password without having to provide their old password. The most common use of this would be a 'Forgot password?' feature in your app.
Note that you can also implement your own password reset flow using application-level authentication and the /password endpoint. For more, see Changing a user password.
To use the API BaaS password reset flow, do the following:
Get the password reset request form.
GETrequest to the following:
For example, using cURL, a request to reset the password for a user with username 'someUser' would look like this:
curl -x GET https://api.usergrid.com/your-org/your-app/users/someUser/resetpw
Display the returned password reset request form to the user.
The request to
/resetpwwill return the HTML for the standard API BaaS password reset request form that you will display to your user. The request form requires the users to provide their username as well as answer a standard CAPTCHA challenge:
You can apply any additional styling you wish to the form to make it match the style of your app before displaying it to the user.
Let Apigee handle the rest!
Once the user submits the form with their username, they will receive an email from Apigee that contains a link to the password reset form, where they can specify a new password. The user entity will be updated immediately.
Help or comments?
- Something's not working: See Apigee Support.
- Something's wrong with the docs: Click Send Feedback in the lower right.
(Incorrect? Unclear? Broken link? Typo?)