Reset Password
POST/api/auth/password/reset
Perform a password reset using a token you obtained the user received in a password reset email.
You can learn more about the password reset here.
When request a password reset through POST /api/auth/password/reset-request
and email is enabled in your application
an email containing a link is sent to the user's email address.
This link should point to the frontend of your application.
Your frontend should extract the token from the URL and send it to this endpoint with the
token as request parameter.
You can find more information about this here.
If successful, the user can log in using the new password afterwards.
You can resend this email through the endpoint POST /api/auth/password/reset-request.
Requirements
- The
passwordmust be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one number, and one special character (!@#$%^&*()_+={}[]|:;'"<>,.?/).
Locale
A locale can be specified for this request. The email will be sent in the specified locale. You can learn more about locale in emails here.
If no locale is specified, the applications default locale will be used. You can learn more about configuring the default locale here.
Note: If email is disabled, there is no way to reset the password.
Request
Responses
- 200
- 401
- 404
- 500
Success.
The following error codes correspond to this status:
PASSWORD_RESET_TOKEN_EXPIRED: Indicates that the password reset token is expired.PASSWORD_RESET_TOKEN_INVALID: Indicates that the password reset token cannot be decoded.PASSWORD_RESET_TOKEN_MISSING: Thrown when the password reset token is missing.
The following error codes correspond to this status:
USER_NOT_FOUND: User not found.
The following error codes correspond to this status:
PASSWORD_RESET_TOKEN_SECRET_FAILURE: Thrown when an exception occurs when trying to decrypt the secret stored inside the password reset token.DATABASE_FAILURE: Exception representing a general failure related to database operations.HASH_FAILURE: Exception representing a general failure related to hashing operations.POST_COMMIT_SIDE_EFFECT_FAILURE: Exception representing a failure to perform a side effect after a successful database operation.