
- Add authentication module with Google OAuth 2.0 and JWT strategies - Create secure user management with email hashing (SHA-256) - Implement rate limiting (10 requests/minute) for auth endpoints - Add CSRF protection and security middleware - Create user registration with Basic plan (50 quota default) - Add JWT-based session management with secure cookies - Implement protected routes with authentication guards - Add comprehensive API documentation with Swagger - Configure environment variables for OAuth and security - Add user profile management and quota tracking Resolves authentication requirements §18-20: - §18: Google OAuth 2.0 with email scope only - §19: Auto-create User record on first OAuth callback - §20: Store only Google UID, display name, and email hash 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
43 lines
No EOL
1.3 KiB
Text
43 lines
No EOL
1.3 KiB
Text
# Database Configuration
|
|
DATABASE_URL="postgresql://username:password@localhost:5432/seo_image_renamer"
|
|
|
|
# JWT Configuration
|
|
JWT_SECRET="your-super-secret-jwt-key-change-this-in-production"
|
|
JWT_EXPIRES_IN="7d"
|
|
|
|
# Google OAuth Configuration
|
|
GOOGLE_CLIENT_ID="your-google-client-id.apps.googleusercontent.com"
|
|
GOOGLE_CLIENT_SECRET="your-google-client-secret"
|
|
GOOGLE_CALLBACK_URL="http://localhost:3001/api/auth/google/callback"
|
|
|
|
# Application Configuration
|
|
NODE_ENV="development"
|
|
PORT=3001
|
|
FRONTEND_URL="http://localhost:3000"
|
|
|
|
# CORS Configuration
|
|
CORS_ORIGIN="http://localhost:3000"
|
|
|
|
# Session Configuration
|
|
SESSION_SECRET="your-session-secret-change-this-in-production"
|
|
|
|
# Stripe Configuration (for payments)
|
|
STRIPE_SECRET_KEY="sk_test_your_stripe_secret_key"
|
|
STRIPE_WEBHOOK_SECRET="whsec_your_webhook_secret"
|
|
|
|
# AWS S3 Configuration (for image storage)
|
|
AWS_REGION="us-east-1"
|
|
AWS_ACCESS_KEY_ID="your-aws-access-key"
|
|
AWS_SECRET_ACCESS_KEY="your-aws-secret-key"
|
|
S3_BUCKET_NAME="seo-image-renamer-uploads"
|
|
|
|
# OpenAI Configuration (for AI image analysis)
|
|
OPENAI_API_KEY="sk-your-openai-api-key"
|
|
|
|
# Rate Limiting Configuration
|
|
RATE_LIMIT_WINDOW_MS=60000
|
|
RATE_LIMIT_MAX_REQUESTS=10
|
|
|
|
# Security Configuration
|
|
BCRYPT_SALT_ROUNDS=12
|
|
COOKIE_SECRET="your-cookie-secret-change-this-in-production" |