docs: documenta NEXT_PUBLIC_APP_URL e setup Google OAuth nel runbook
Due colpevoli scoperti durante il deploy live: - `NEXT_PUBLIC_APP_URL` mancava nel runbook ed in .env.example. Il client di Better Auth (lib/auth-client.ts) la usa come baseURL — senza, fallback a localhost:3000 → CORS error sul click di "Continua con Google". Va inlined al build (è NEXT_PUBLIC_*), quindi modificarla richiede rebuild. - Setup Google OAuth: il bottone è SSG (prerendered al build), quindi aggiungere le env GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET non basta — serve rebuild perché `enabledSocialProviders` è valutato a build-time. Aggiunta una sezione 4.3.bis dedicata al setup Google con i punti critici evidenziati. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
6a5559fa0a
commit
38f28e015b
2 files changed
+38
-3
No files matched your search
@@ -17,9 +17,14 @@ PRISMA_FIELD_ENCRYPTION_KEY=
|
||||
BETTER_AUTH_SECRET=
|
||||
BETTER_AUTH_URL=http://localhost:3000
|
||||
|
||||
# Google OAuth (configurato a fine progetto)
|
||||
# GOOGLE_CLIENT_ID=
|
||||
# GOOGLE_CLIENT_SECRET=
|
||||
# Google OAuth — abilita il bottone "Continua con Google" in /sign-in /sign-up.
|
||||
# Setup: console.cloud.google.com → APIs & Services → Credentials →
|
||||
# OAuth client ID (Web app) → Authorized redirect URI:
|
||||
# https://<DOMAIN>/api/auth/callback/google
|
||||
# Devono essere configurate ANCHE in apps/web/.env (Better Auth le legge da
|
||||
# entrambi i lati per costruire enabledSocialProviders al boot).
|
||||
GOOGLE_CLIENT_ID=
|
||||
GOOGLE_CLIENT_SECRET=
|
||||
|
||||
# Sentry — error tracking (lascia vuoto per disabilitare)
|
||||
# SENTRY_DSN=
|
||||
|
||||
Reference in new issue
Block a user