Overview
The Trading Analysis Dashboard uses Google OAuth 2.0 for secure authentication. All API endpoints require an authenticated session.Authentication Flow
Endpoints
Login Page
Initiate OAuth
OAuth Callback
code(string): Authorization code from OAuth providerstate(string): State parameter for security
Logout
User Profile
Session Management
- Sessions are stored server-side using Flask sessions
- Session cookies are HTTP-only and secure (in production)
- Sessions expire after a period of inactivity
- Users must re-authenticate after session expiration
User Authorization
Access is controlled by theAUTHORIZED_USERS environment variable:
Error Responses
401 Unauthorized
403 Forbidden
Security Best Practices
HTTPS Only
Always use HTTPS in production for OAuth callbacks
Secure Sessions
Session cookies are HTTP-only and secure
User Whitelist
Only authorized email addresses can access the application
Token Security
OAuth tokens are never exposed to the client