POST /api/auth/login
Authenticates a user with email and password. On success, Supabase sets session cookies automatically. Accounts flagged as blocked are denied access regardless of credentials.Request body
The user’s email address.
The user’s password.
Response
200 — Success
Confirmation string. Value:
"Login exitoso".The authenticated Supabase Auth user object.
Supabase sets session cookies on the response automatically. You do not need to manage tokens manually for browser-based clients.
400 — Invalid credentials
A Supabase Auth error message — for example,
"Invalid login credentials" when the email or password is incorrect.403 — Account blocked
Returned when the user’s profile hasbloqueado = true. The session is signed out immediately after this check.
Value:
"Tu cuenta ha sido bloqueada por un administrador. No puedes iniciar sesión."500 — Server error
Possible values:
"Error al verificar el estado de la cuenta."— the profile lookup failed after authentication. The session is signed out."Error interno del servidor"— an unexpected error occurred.
Example request
Example responses
Success (200)
Invalid credentials (400)
Blocked account (403)