refreshToken httpOnly cookie.
If a refreshToken cookie from a previous session is present, it is automatically revoked before issuing a new one.
Endpoint
Request body
The user’s registered email address. The rate limiter uses this value as the identifier.
The user’s password.
Response
true on a successful login.Human-readable result message. Value:
"Login successful".refreshToken cookie is also set on the response (httpOnly, secure, sameSite: none, scoped to /api/auth).
Error cases
| Status | Message | Cause |
|---|---|---|
400 | Validation error message | Missing or invalid request body fields |
401 | "User not found" | No account exists for the given email |
401 | "Invalid password" | Password does not match the stored hash |
429 | "Too many requests." | Rate limit of 5 attempts per 15 minutes exceeded |
500 | "Login failed" | Unexpected server error |
Example
The
-c cookies.txt flag saves the refreshToken cookie to a file so it can be reused in subsequent requests. In browser-based clients, this is handled automatically.