Login User
POST
/auth/login
Authenticate a user with email/username and password. Email is automatically converted to lowercase. Depending on account state and 2FA, this endpoint may return: (1) full session, (2) pending 2FA partial session, or (3) EMAIL_NOT_VERIFIED when AUTH.verify_registration=true and the account is not verified.
Request Body
application/json
JSON
Responses
Login processed - returns full session or pending 2FA partial session
application/json
JSON "success": true, "user": { "id": "usr_123abc", "name": "John", "last_name": "Doe", "user_name": "johndoe", "user_type": "customer", "is_verified": true, "two_factor": false }, "sessionId": "ses_xyz789abc123", "expiresAt": "2025-12-15T10:00:00Z"
{
}