# Operational Reference
Back to API index | Back to docs index | Back to project README
| Code | Meaning | Usage |
| 200 | OK | Successful request |
| 400 | Bad Request | Invalid input data |
| 401 | Unauthorized | Authentication required or failed |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
- Always use HTTPS in production - Set
IS_DEPLOYED=true and ensure your server uses SSL/TLS
- Keep SESSION_SECRET_KEY secure - Use a strong, randomly generated key
- Enable 2FA for sensitive applications - Set
MBKAUTH_TWO_FA_ENABLE=true
- Validate all user input - Never trust client-side data
- Use rate limiting - Already implemented for authentication endpoints
- Keep dependencies updated - Regularly update npm packages
- Monitor for security vulnerabilities - Use
npm audit
- Use prepared statements - Prevent SQL injection (already implemented)
- Implement proper logging - Track authentication events
- Regular security audits - Review code and configurations
| Endpoint | Limit | Window |
/mbkauthe/api/login | 8 requests | 1 minute |
/mbkauthe/api/logout | 10 requests | 1 minute |
/mbkauthe/api/verify-2fa | 5 requests | 1 minute |
/mbkauthe/api/github/login | 10 requests | 5 minutes |
/mbkauthe/api/github/login/callback | 10 requests | 5 minutes |
/mbkauthe/login | 8 requests | 1 minute |
/mbkauthe/info | 8 requests | 1 minute |
/mbkauthe/test | 8 requests | 1 minute |
| Endpoint | Limit | Window |
POST /api/cli/device | 20 requests | 1 minute |
POST /api/cli/device/approve | 30 requests | 1 minute |
POST /api/cli/device/token | 60 requests | 1 minute |
| Endpoint | Limit | Window |
| Admin operations (terminate sessions, etc.) | 3 requests | 5 minutes |
Rate limits are applied per IP address. Logged-in users are exempt from some rate limits (e.g., login page rate limit). The /mbkauthe/cli/device/:userCode page render is session-authenticated and not rate-limited.