Overview
The backend uses three authentication mechanisms:
All methods ultimately produce the same local JWT access token that subsequent API calls use.
JWT Authentication (Primary)
Key Pair
The backend signs tokens with an RSA private key and verifies them with the public key:Token Structure
Token Lifecycle
Token Expiry
Configured via env vars:FastAPI Dependencies
Email/Password Login Flow
Email Verification
New accounts require email verification before accessing protected features:Google OAuth
Sign in with Google
Google Search Console Integration
Microsoft OAuth
AWS Cognito Auth
Used when users authenticate via the auth.webyes.com portal:Permission System
Architecture
Permission Slugs
Format:scope:resource:action
Redis Cache
On startup, all role→permission mappings are cached in Redis:Permission Check
verify_token:
Rate Limiting
Sensitive endpoints are rate-limited via SlowAPI (10 requests/minute per IP):
On exceeding the limit:
HTTP 429 Too Many Requests