Skip to main content

Rate Limiting

LumoAuth applies rate limiting to protect endpoints from abuse, brute force attacks, and excessive load. Rate limits are enforced per tenant and per IP address.


Rate Limit Tiers

Endpoint CategoryRate LimitWindow
Login10 requestsPer minute per IP
Token30 requestsPer minute per client
Registration5 requestsPer minute per IP
Password Reset3 requestsPer minute per email
MFA Verification5 requestsPer minute per user
API (authenticated)100 requestsPer minute per token
API (unauthenticated)20 requestsPer minute per IP
SCIM100 requestsPer minute per token
WebhooksN/AOutbound, not rate-limited

Rate Limit Headers

All API responses include rate limit headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1706400060
HeaderDescription
X-RateLimit-LimitMaximum requests allowed in the window
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

Rate Limit Exceeded

When a rate limit is exceeded, the API returns:

HTTP/1.1 429 Too Many Requests
Retry-After: 30

{
"error": "rate_limit_exceeded",
"error_description": "Too many requests. Try again in 30 seconds.",
"retry_after": 30
}

Handling Rate Limits

async function apiCallWithRetry(url, options, maxRetries = 3) {
for (let attempt = 0; attempt < maxRetries; attempt++) {
const response = await fetch(url, options);

if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '5');
await new Promise(r => setTimeout(r, retryAfter * 1000));
continue;
}

return response;
}
throw new Error('Rate limit exceeded after max retries');
}

IP-Based Protection

In addition to rate limits, LumoAuth tracks IP behavior:

ProtectionDescription
Progressive delaysIncreasing wait times after failed attempts from same IP
Temporary IP blocksIPs with excessive failures are temporarily blocked
Trusted IP whitelistingExempt specific IP ranges from rate limits

Configure trusted IPs at /t/{tenantSlug}/portal/configuration/adaptive-auth.