Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/SoftwareVerse/userverse/llms.txt

Use this file to discover all available pages before exploring further.

Userverse provides an OTP-based password reset flow. When a user forgets their password, they request a one-time PIN by email and then submit it alongside their new password to complete the reset.
The password reset flow requires a working mail server configuration so that OTP emails can be delivered. See configuration for the required email.HOST, email.PORT, email.USERNAME, and email.PASSWORD settings.

Reset flow

1

Request a password reset

Send a PATCH request to /password-reset/request with the user’s email address as a query parameter. No authentication is required.
curl --request PATCH \
  --url "http://localhost:8000/password-reset/request?email=jane@example.com"
Userverse looks up the account and sends a one-time PIN to the provided email address. A successful response returns 202 Accepted.
The OTP is time-limited. Advise users to complete the reset promptly after requesting it.
2

Receive the OTP

The user receives an email containing the one-time PIN. They will use it in the next step alongside their new desired password.
3

Validate the OTP and set a new password

Send a PATCH request to /password-reset/validate-otp with:
  • HTTP Basic Auth — use the user’s email as the username and the new desired password as the password.
  • one_time_pin query parameter — the OTP from the email.
curl --request PATCH \
  --url "http://localhost:8000/password-reset/validate-otp?one_time_pin=<otp_from_email>" \
  --user "jane@example.com:mynewpassword"
The Basic Auth password field carries the new password, not the old one. Userverse validates the OTP and, if it is correct, replaces the existing password with the value supplied here.
A successful response returns 202 Accepted confirming the password has been changed.
4

Log in with the new password

Use the new password to obtain a fresh JWT token.
curl --request PATCH \
  --url http://localhost:8000/user/login \
  --user "jane@example.com:mynewpassword"

Endpoint reference

MethodPathAuthDescription
PATCH/password-reset/requestNoneSends an OTP to the given email address.
PATCH/password-reset/validate-otpBasic AuthValidates the OTP and sets the new password.

User management

Full user lifecycle: register, log in, and update your profile.

Email verification

Activate a new account by verifying the user’s email address.

Build docs developers (and LLMs) love