The Don Mamino API uses JWT-based authentication. Send your credentials to the login endpoint and receive a signed token that grants access to all protected routes. The token encodes the user’s ID, role, and assigned sede (location), and is valid for 8 hours from the time of issue.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/luisllatas-dev/Proyecto_Pasteleria_DonMamino/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/auth/login
Authenticate a user and receive a JWT token. No authorization header is required to call this endpoint.Request body
The registered email address of the user account.
The account password. Passwords are verified against bcrypt hashes stored in the database.
Response fields
A human-readable confirmation message. Returns
"Inicio de sesión exitoso" on success.Signed JWT token. Pass this as a Bearer token in the
Authorization header of protected requests. Expires after 8 hours.Object containing basic information about the authenticated user.
Examples
Sample response
The token expires 8 hours after it is issued. Once expired, the client must authenticate again to receive a new token.
Using the token
Include the token in theAuthorization header of every protected request:
Error responses
| Status | Description |
|---|---|
401 | Invalid credentials — the email was not found or the password did not match. Response body: { "message": "Credenciales inválidas" } |
500 | Internal server error. Response body: { "error": "<error message>" } |