Reset Password
Integrate the reset password feature to allow users to securely reset their password if forgotten.
Reset Password Feature
The Forgot Password feature allows users to securely reset their password if they’ve forgotten it. By integrating this feature, you provide a user-friendly and secure way for users to regain access to their accounts.
Step 1: Sending OTP for Verification (POST Request)
Overview
In this step, an OTP (One-Time Password) is generated and sent to the user's registered email address to verify their identity during the password reset process.
1. Integration Example
2. Error Responses
Status Code | Message |
---|---|
400 | Either userName or userEmail must be provided! |
400 | Invalid userName! |
400 | Invalid Email! |
400 | Please Validate Your Details. |
401 | Your device is unauthorized. |
429 | OTP request limit exceeded. Please try again later. |
500 | An unexpected error occurred. Please report this issue at GitHub. |
3. Success Response
A 201
response indicates that the OTP has been successfully sent to the user's email. The response will include:
Step 2: Verifying OTP and Updating the Password (PUT Request)
Once the OTP has been sent and received, this step verifies the OTP and allows the user to update their password.
1. Integration
2. Error Responses
Status Code | Message |
---|---|
400 | Either userName or userEmail must be provided! |
400 | OTP is required! |
400 | New password is required! |
400 | Invalid userName! |
400 | Invalid Email! |
400 | Please Validate Your Details. |
400 | OTP is expired! |
400 | Invalid OTP! |
401 | Your device is unauthorized. |
500 | An unexpected error occurred. Please report this issue at GitHub. |
3. Success Response
A 201
response indicates the password has been successfully updated. The response will include:
Note: After successfully updating the password, redirect the user to the login page so they can authenticate with their new credentials.