VinylVibes uses JWT-based authentication. Two endpoints handle auth:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/akibanks/tienda_musica_web/llms.txt
Use this file to discover all available pages before exploring further.
POST /login returns a token and session metadata, and POST /registro creates a new account. The JWT must be included in all protected requests via the Authorization: Bearer header. Tokens are stored in localStorage by the frontend after a successful login and cleared on logout.
POST /login
Authenticates an existing user and returns a signed JWT alongside session metadata. The frontend stores the token and user state inlocalStorage immediately after a successful response.
Request body
The account username.
The account password.
Example request
Response fields
Signed JWT to include in subsequent authenticated requests via
Authorization: Bearer <token>.The user’s display name as stored in the database.
true if the user holds the admin role.true if the user holds the demo (read-only admin) role.Success response (200)
Error response (401)
localStorage keys written after login
After a successful/login response, login.js writes the following keys to localStorage:
| Key | Value |
|---|---|
vv_token | token from the response |
usuarioLogueado | nombre from the response |
esAdmin | "true" if es_admin is true, otherwise "false" |
esDemo | "true" if es_demo is true, otherwise "false" |
POST /registro
Creates a new user account. The frontend validates that the password is at least 6 characters before sending the request.Request body
The desired username for the new account.
The account password. Must be at least 6 characters long.
Example request
Success response (200)
Error response (400)
New accounts are created with the
cliente role by default. An admin must manually elevate the role via the admin panel.