These endpoints cover the core login flow for UniMaps: credential-based login that optionally triggers two-factor authentication, a three-step password reset flow (send code → verify code → reset), an alternative login path using a downloadedDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Jcofles/Proyecto-web/llms.txt
Use this file to discover all available pages before exploring further.
.jw secure key file, and logout. All responses are JSON. Repeated failed login attempts trigger a 15-minute account lockout tracked server-side per email address.
POST /api/auth/login
Authenticates a user with email and password. On success, returns a Sanctum bearer token. If the user has two-factor authentication enabled, the token is withheld and a 2FA code is sent to the registered email instead.The user’s registered email address.
The user’s password.
Responses
Human-readable result message.
Sanctum bearer token. Present only when login succeeds and 2FA is not required.
true when the account has 2FA enabled. No token is returned in this case.Seconds until the 2FA code expires (180 seconds). Present only when
two_factor_required is true.Basic user data (
id, name, email, status). Present only on successful login without 2FA.true when the account is temporarily locked due to repeated failed attempts.Seconds remaining in the lockout period. Present when
blocked is true.Failed attempts still allowed before lockout. Present when credentials are wrong but the account is not yet locked.
The account is locked for 15 minutes after 5 consecutive failed attempts for an existing email address. Attempts against non-existent email addresses are silently discarded with a generic 401 to prevent user enumeration.
POST /api/auth/forgot-password
Sends a 6-digit numeric reset code to the given email address. The code expires in 15 minutes.Email address associated with the account.
Responses
Confirmation that the code was sent.
The address the code was sent to.
POST /api/auth/verify-code
Verifies the 6-digit code sent by/api/auth/forgot-password without resetting the password yet. This is step two of the three-step reset flow.
The account email address.
The 6-digit numeric code from the reset email. Must be exactly 6 characters.
Responses
"Código verificado" on success.Echoes back the verified email address.
POST /api/auth/reset-password
Resets the account password. Requires the same verified code from the previous step. This is the final step of the password reset flow.The account email address.
The 6-digit reset code. Must be exactly 6 characters.
The new password. Minimum 8 characters.
Must match
password.Responses
"Contraseña actualizada exitosamente" on success.POST /api/auth/login-with-key
Authenticates a user by providing the raw content of their.jw secure key file. The server hashes the provided content and compares it against the stored hash for the account. This is an alternative login path for users who have lost their password.
The account email address.
Full text content of the
.jw key file.Responses
Human-readable result.
Sanctum bearer token for the authenticated session.
Full user model data.
POST /api/auth/logout
Revokes the bearer token used in the current request. Requires authentication. Headers| Header | Value |
|---|---|
Authorization | Bearer {token} |
Responses
"Sesión cerrada exitosamente" on success.