- Install next-auth@beta, bcryptjs, zod, and @auth/prisma-adapter - Create auth.ts with credentials provider and JWT session strategy - Create auth.config.ts for edge-compatible middleware configuration - Add NextAuth type extensions for session and JWT - Create API route handler for authentication - Configure environment variables for NextAuth - Add AUTH_SETUP.md documentation Task: 1. Set up authentication infrastructure Requirements: 1.1, 2.1
10 lines
360 B
Plaintext
10 lines
360 B
Plaintext
DATABASE_URL="mysql://user:password@host:port/database"
|
|
|
|
# NextAuth Configuration
|
|
# NEXTAUTH_URL should be your production URL in production
|
|
NEXTAUTH_URL=http://localhost:3000
|
|
|
|
# Generate a secure secret with: openssl rand -base64 32
|
|
NEXTAUTH_SECRET=your-secret-key-here-please-change-in-production
|
|
AUTH_SECRET=your-secret-key-here-please-change-in-production
|