Change Password (using Request)
Changes a user's password and logs him out from all devices. Requires a password reset id.
Usage
Node.js / Next.js / Express.js
await provider.auth.changePasswordUsingRequest('<request_id>', '<new_password>');Arguments
| Name | Type | Description |
|---|---|---|
requestId | string | Required. The activation/reset ID (24 chars). |
newPassword | string | Required. The new password. |
Response
Type: Promise<void>
Returns nothing (void) upon success.
Errors
BAD_REQUEST: One or more body params are invalid.UNKNOWN_ERROR: An unknown error has occured.
POST https://api.productflame.com/v1/auth/new-password
Request
Headers
{ "Content-Type": "application/json", "Authorization": "<your_secret_api_key>"}Body
{ "requestId": "<request_id>", "newPassword": "<new_password>"}Response Format
200 OK (Success)
{ "message": "ok"}400 Bad Request (Validation)
{ "error": "BAD_REQUEST", "message": "One or more body params are invalid."}One or more body params are invalid.
500 Internal Server Error
{ "error": "UNKNOWN_ERROR", "message": "An unknown error has occured."}An unknown error has occured.