This page covers four endpoints that handle account recovery and email verification: requesting a password reset link, setting a new password with that link, resending the verification email, and confirming an email address via the verification token.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Danielsl4/TFG_DAM_2526_Consulta2/llms.txt
Use this file to discover all available pages before exploring further.
POST /forgot-password
Send a password reset link to the account’s registered email address.The reset link expires after 60 minutes. If the link is not used in time, the user must request a new one.
Rate limiting
Protected byauthLimiter: 10 requests per 15 minutes per IP.
Request body
The email address associated with the account.
Response
200 — Request processed
Error responses
| Status | Condition |
|---|---|
400 | The email field is missing from the request body. |
500 | Internal server error or failure sending the email. |
Example
cURL
POST /reset-password
Set a new password using the token received in the reset email.Request body
The reset token from the password reset email link. Valid for 60 minutes from the time the
/forgot-password request was made.The new password to set for the account. Stored as a bcrypt hash (cost factor 10).
Response
200 — Password updated
Error responses
| Status | Condition |
|---|---|
400 | token or newPassword is missing, or the token is invalid or has expired. |
500 | Internal server error. |
Example
cURL
POST /resend-verification
Resend the account verification email to an unverified account.Rate limiting
Protected byauthLimiter: 10 requests per 15 minutes per IP.
Request body
Provide at least one of the following:The email address associated with the account.
The username associated with the account. Lookup is case- and accent-insensitive.
Response
200 — Verification email sent
Error responses
| Status | Condition |
|---|---|
400 | Neither email nor username provided, or the account is already verified. |
404 | No account found matching the provided email or username. |
500 | Internal server error or failure sending the email. |
Example
cURL
GET /verify-email/:token
Verify an account’s email address using the token from the verification email. On success, the account is marked as verified and a JWT token is returned to allow automatic login.Path parameter
The verification token from the link in the registration or resend-verification email.
Response
200 — Account verified
Confirmation that the account is now verified.
A signed JWT token for immediate login. Expires in 7 days for
user accounts, or 6 hours for admin and referee accounts.Error responses
| Status | Condition |
|---|---|
400 | The token is invalid or the account has already been verified. |
500 | Account verified but JWT could not be generated, or internal server error. |
Example
cURL