UniMaps supports email-based two-factor authentication. When 2FA is enabled on an account, a successful password-based login does not return a bearer token immediately. Instead, a 12-character alphanumeric code (formatted asDocumentation 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.
XXXX-XXXX-XXXX) is sent to the user’s registered email. The user must submit that code to /api/auth/two-factor/verify within 3 minutes to receive their token.
POST /api/auth/two-factor/enable
Activates two-factor authentication for the authenticated user. The account’s email address must already be verified before 2FA can be enabled. Requires a valid bearer token. Headers| Header | Value |
|---|---|
Authorization | Bearer {token} |
Responses
Human-readable result message.
Always
true when the request succeeds.Enabling 2FA does not affect the current session. Existing tokens remain valid. The 2FA challenge only applies to new logins made after enabling.
POST /api/auth/two-factor/disable
Deactivates two-factor authentication for the authenticated user. Any pending 2FA code stored on the account is cleared. Requires a valid bearer token. Headers| Header | Value |
|---|---|
Authorization | Bearer {token} |
Responses
Human-readable result message.
Always
false when the request succeeds.POST /api/auth/two-factor/verify
Completes a 2FA login challenge. Call this endpoint after a login attempt that returned"two_factor_required": true. Submit the code that was emailed to the user and receive a bearer token on success.
This endpoint does not require an Authorization header — no token exists until verification succeeds.
The email address used in the original login attempt.
The 12-character alphanumeric code sent to the user’s email, in
XXXX-XXXX-XXXX format. The code expires 3 minutes after being issued.Responses
"Verificación exitosa. Has iniciado sesión." on success.Sanctum bearer token for the authenticated session.
Basic user data:
id, name, email, status.The code format is
XXXX-XXXX-XXXX — 12 alphanumeric characters split into three groups of four by hyphens. The server hashes the provided value with SHA-256 before comparing it against the stored hash, so the raw code is never persisted.