Configure Environment Variables

Create .env.local at the project root. Add the Google credentials after creating them in the next chapter. AUTH_API_URL must be your real trusted backend.

File: `.env.local`
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=replace_with_generated_secret
GOOGLE_CLIENT_ID=replace_with_google_client_id
GOOGLE_CLIENT_SECRET=replace_with_google_client_secret
AUTH_API_URL=https://api.your-domain.example
💡 Do not use NEXT_PUBLIC_ for secrets. Restart the development server after environment changes.