Login
**What:** Verify credentials by email OR username and return a JWT plus the safe user.
**Auth:** None.
**Body (JSON):**
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
| emailOrUsername | string | yes | Email (case-insensitive) or username (case-sensitive). | `moviefan@example.com` |
| password | string | yes | Plaintext password to compare against the stored hash. | `secret123` |
**Returns:** `data = { token, user }`. A bad identifier and a bad password both return the same `401` (no leak of which was wrong).
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
password
emailOrUsername
Response
OK
ok
data
Errors
400
Bad Request Error
401
Unauthorized Error

