Security
Intotes implements multiple layers of security to protect user data and funds.
Authenticationβ
JWT Tokensβ
- Access tokens: Short-lived (20 minutes), used for API authentication
- Refresh tokens: Longer-lived (72 hours), used to obtain new access tokens
- Both tokens are set as HTTP-only cookies, preventing JavaScript access and XSS token theft
- Tokens are signed with a server-side secret key
OAuth 2.0β
Supported providers: Google, GitHub, VK, Yandex, Telegram. OAuth flow uses standard authorization code grant with state parameter for CSRF protection.
Request Securityβ
CORS (Cross-Origin Resource Sharing)β
- Allowed origins configured per environment
- Credentials (cookies) are included in cross-origin requests
- Preflight requests handled automatically
Request Limitsβ
- Maximum request body size: 1 MB
- Content-Type validation enforced on POST/PUT/PATCH requests
- Rate limiting per IP + endpoint (see Rate Limiting)
Security Headersβ
All responses include standard security headers:
| Header | Value | Purpose |
|---|---|---|
X-Content-Type-Options | nosniff | Prevent MIME type sniffing |
X-Frame-Options | DENY | Prevent clickjacking |
X-XSS-Protection | 1; mode=block | Enable XSS filter |
Referrer-Policy | strict-origin-when-cross-origin | Control referrer information |
Data Securityβ
Passwordsβ
- Passwords are hashed using bcrypt before storage
- Minimum password length enforced at registration
- Password reset requires email verification
Sensitive Dataβ
- Private keys for crypto wallets are encrypted at rest
- OAuth tokens are not stored after exchange
- User email is partially masked in referral displays
Network Securityβ
HTTPSβ
All API communication must use HTTPS in production. HTTP requests are redirected to HTTPS.
Cloudflareβ
The platform uses Cloudflare for:
- DDoS protection
- SSL/TLS termination
- CDN for static assets (images in R2)
- IP geolocation
Best Practices for API Consumersβ
- Always use HTTPS β never send credentials over HTTP
- Store tokens securely β rely on HTTP-only cookies rather than localStorage
- Implement token refresh β handle 401 responses by refreshing the access token
- Validate responses β check HTTP status codes and error codes
- Use rate limit headers β respect
X-RateLimit-RemainingandRetry-After