pub async fn reset_password(
__arg0: State<AppState>,
__arg1: Json<ResetPasswordRequest>,
) -> impl IntoResponse
Expand description
POST /api/auth/reset-password
Reset a user’s password using a valid reset token.
§Request Body
{
"token": "abcdef123456",
"new_password": "SecureP@ssw0rd!"
}
§Responses
200 OK
{
"success": true,
"data": null,
"message": "Password has been reset successfully."
}
400 Bad Request
(validation failure)
{
"success": false,
"message": "Password must be at least 8 characters"
}
400 Bad Request
(invalid token)
{
"success": false,
"message": "Reset failed. The token may be invalid or expired."
}