Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eggarcia98/auth-backend/llms.txt
Use this file to discover all available pages before exploring further.
POST /api/v1/auth/login
Authenticates a user with email and password. On success, sets accessToken and refreshToken as HTTP-only cookies. The response body does not contain the tokens directly.
Request
Body parameters
The user’s email address.
The user’s password.
Response
Whether the request succeeded.
Confirmation message:
"Login successful, tokens set in cookies".Cookies set
On a successful login, the server sets the following HTTP-only cookies:| Cookie | Description |
|---|---|
accessToken | Short-lived JWT for authenticating requests. Expires according to expiresIn. |
refreshToken | Long-lived token for obtaining new access tokens. Expires after 7 days. |
HttpOnly, SameSite=Strict, and Secure (in production).
Examples
Success response (200)
Tokens are not returned in the response body. They are stored in HTTP-only cookies, which are sent automatically by the browser on subsequent requests. Include
credentials: 'include' in your fetch calls to ensure cookies are sent.Errors
| HTTP status | Code | Description |
|---|---|---|
400 | VALIDATION_ERROR | The request body is missing required fields or contains an invalid email format. |
401 | UNAUTHORIZED | The email or password is incorrect. |