add clerk oauth
This commit is contained in:
+83
-50
@@ -1,63 +1,96 @@
|
||||
# Yargı MCP Server Environment Configuration
|
||||
# Copy this file to .env and customize as needed
|
||||
# OAuth Configuration for Clerk + Google
|
||||
# Copy this file to .env and fill in your actual values
|
||||
|
||||
# Server Configuration
|
||||
# =============================================================================
|
||||
# AUTHENTICATION SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# Enable/disable authentication (set to "true" to enable OAuth)
|
||||
ENABLE_AUTH=false
|
||||
|
||||
# =============================================================================
|
||||
# CLERK CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Clerk API keys (get from https://dashboard.clerk.com/)
|
||||
CLERK_SECRET_KEY=sk_test_your_secret_key_here
|
||||
CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
|
||||
|
||||
# OAuth Redirect URLs
|
||||
CLERK_OAUTH_REDIRECT_URL=http://localhost:8000/auth/callback
|
||||
CLERK_FRONTEND_URL=http://localhost:3000
|
||||
|
||||
# Clerk domain issuer (usually auto-configured)
|
||||
CLERK_ISSUER=https://your-clerk-domain.clerk.accounts.dev
|
||||
|
||||
# =============================================================================
|
||||
# GOOGLE OAUTH SETTINGS
|
||||
# =============================================================================
|
||||
# Note: Google OAuth is configured through Clerk dashboard
|
||||
# You need to:
|
||||
# 1. Go to Clerk Dashboard > Social Connections
|
||||
# 2. Enable Google provider
|
||||
# 3. Add your Google OAuth client ID and secret
|
||||
# 4. Configure redirect URIs in Google Console
|
||||
|
||||
# =============================================================================
|
||||
# STRIPE CONFIGURATION (for payments/subscriptions)
|
||||
# =============================================================================
|
||||
|
||||
STRIPE_SECRET=sk_test_your_stripe_secret_key_here
|
||||
STRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret_here
|
||||
|
||||
# =============================================================================
|
||||
# SERVER CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# CORS origins (comma-separated list)
|
||||
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8000,https://yourdomain.com
|
||||
|
||||
# Server settings
|
||||
HOST=0.0.0.0
|
||||
PORT=8000
|
||||
LOG_LEVEL=INFO
|
||||
LOG_LEVEL=info
|
||||
|
||||
# Authentication Configuration
|
||||
ENABLE_AUTH=false # Set to true in production for JWT validation
|
||||
# =============================================================================
|
||||
# MCP SERVER SETTINGS
|
||||
# =============================================================================
|
||||
|
||||
# CORS Configuration
|
||||
# Comma-separated list of allowed origins
|
||||
# Use * to allow all origins (not recommended for production)
|
||||
ALLOWED_ORIGINS=http://localhost:3000,http://localhost:8080,https://yourdomain.com
|
||||
# Additional MCP server configuration can go here
|
||||
# For example, rate limiting, feature flags, etc.
|
||||
|
||||
# Authentication (optional)
|
||||
# Uncomment and set to enable token-based authentication
|
||||
# API_TOKEN=your-secret-token-here
|
||||
# Example: Rate limiting
|
||||
# MAX_REQUESTS_PER_MINUTE=60
|
||||
# BURST_CAPACITY=20
|
||||
|
||||
# Worker Configuration
|
||||
# Number of worker processes (for production)
|
||||
# WORKERS=4
|
||||
# =============================================================================
|
||||
# USAGE INSTRUCTIONS
|
||||
# =============================================================================
|
||||
|
||||
# SSL Configuration (optional)
|
||||
# SSL_CERT_FILE=/path/to/cert.pem
|
||||
# SSL_KEY_FILE=/path/to/key.pem
|
||||
# 1. Copy this file to .env:
|
||||
# cp .env.example .env
|
||||
|
||||
# Database Timeouts (seconds)
|
||||
# Adjust based on your network conditions
|
||||
YARGITAY_TIMEOUT=60
|
||||
DANISTAY_TIMEOUT=60
|
||||
BEDESTEN_TIMEOUT=60
|
||||
ANAYASA_TIMEOUT=90
|
||||
KIK_TIMEOUT=45
|
||||
REKABET_TIMEOUT=45
|
||||
UYUSMAZLIK_TIMEOUT=30
|
||||
EMSAL_TIMEOUT=60
|
||||
# 2. Get Clerk credentials:
|
||||
# - Sign up at https://clerk.com/
|
||||
# - Create a new application
|
||||
# - Go to API Keys tab
|
||||
# - Copy Secret Key and Publishable Key
|
||||
|
||||
# Development Settings
|
||||
# Enable debug mode (not for production)
|
||||
# DEBUG=false
|
||||
# 3. Configure Google OAuth in Clerk:
|
||||
# - In Clerk Dashboard, go to Social Connections
|
||||
# - Enable Google provider
|
||||
# - Get Google OAuth credentials from Google Console
|
||||
# - Add redirect URI: http://localhost:8000/auth/callback
|
||||
|
||||
# Monitoring (optional)
|
||||
# Sentry DSN for error tracking
|
||||
# SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-id
|
||||
# 4. Update OAuth URLs:
|
||||
# - Set CLERK_OAUTH_REDIRECT_URL to your callback URL
|
||||
# - Set CLERK_FRONTEND_URL to your frontend application URL
|
||||
|
||||
# ------ Clerk ------
|
||||
CLERK_PUBLISHABLE_KEY=pk_test_xxx
|
||||
CLERK_SECRET_KEY=sk_test_xxx
|
||||
CLERK_ISSUER=https://your-app.clerk.accounts.dev # issuer & JWKS root (optional if using CLERK_PUBLIC_KEY)
|
||||
# CLERK_PUBLIC_KEY=-----BEGIN PUBLIC KEY-----\nMIIBIjANBg...\n-----END PUBLIC KEY-----
|
||||
# 5. Enable authentication:
|
||||
# - Set ENABLE_AUTH=true
|
||||
|
||||
# ------ Stripe ------
|
||||
STRIPE_SECRET=sk_live_xxx
|
||||
STRIPE_WEBHOOK_SECRET=whsec_xxx
|
||||
|
||||
# Application Configuration
|
||||
APP_URL=http://localhost:8000
|
||||
|
||||
# OpenTelemetry Configuration (optional)
|
||||
# OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
|
||||
# OTEL_SERVICE_NAME=yargi-mcp-server
|
||||
# 6. Test the OAuth flow:
|
||||
# - Start server: uvicorn asgi_app:app --reload
|
||||
# - Visit: http://localhost:8000/auth/login
|
||||
# - Complete OAuth flow with Google
|
||||
# - Check: http://localhost:8000/auth/user
|
||||
Reference in New Issue
Block a user