POST /utils/reset-password/
Reset password
Updates a user's password in the system using a valid password reset token.
Endpoint
POST /utils/reset-password/
Parameters
| Name | Type | Description |
|---|---|---|
| session | SessionDep | The database session dependency used for user lookup and persistence. |
| body | NewPassword | The request body containing the reset token and the new password to be set. |
Request Body
| Field | Type | Description |
|---|---|---|
| token | string | The verification token received via email to authorize the password reset. |
| new_password | string | The new password string to be applied to the user account. |
Response
| Status | Description |
|---|---|
| 200 | Password successfully updated. Returns Message. |
| 400 | Returned if the token is invalid, the user does not exist, or the user account is inactive. Returns HTTPException. |