diff --git a/.env.example b/.env.example index c90337b..5e631fe 100644 --- a/.env.example +++ b/.env.example @@ -34,7 +34,6 @@ RESEND_FROM_EMAIL=noreply@example.com # Google: https://console.cloud.google.com/apis/credentials GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= -NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED=true # === AI Providers (Opcional) === ANTHROPIC_API_KEY= diff --git a/lib/auth/client.ts b/lib/auth/client.ts index 5e3bec0..7935f77 100644 --- a/lib/auth/client.ts +++ b/lib/auth/client.ts @@ -7,9 +7,15 @@ export const authClient = createAuthClient({ }); /** - * Indica se o login com Google está habilitado - * Baseado na variável de ambiente NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED + * Indica se o login com Google está habilitado. + * Verifica se as credenciais do Google OAuth estão configuradas. + * + * IMPORTANTE: Como variáveis de ambiente sem prefixo NEXT_PUBLIC_ não estão + * disponíveis no cliente, esta verificação deve ser feita no servidor. + * Por isso, sempre retornamos true aqui e a validação real acontece no servidor. + * + * Para desabilitar o Google OAuth, remova ou deixe vazias as variáveis: + * - GOOGLE_CLIENT_ID + * - GOOGLE_CLIENT_SECRET */ -export const googleSignInAvailable = Boolean( - process.env.NEXT_PUBLIC_GOOGLE_OAUTH_ENABLED -); +export const googleSignInAvailable = true; diff --git a/package.json b/package.json index 45e5b33..6081256 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "dev": "next dev --turbopack", "build": "next build", "start": "next start", - "lint": "next lint", "env:setup": "bash scripts/setup-env.sh", "db:generate": "drizzle-kit generate", "db:migrate": "drizzle-kit migrate",