feat(auth): gate OAuth buttons on login behind config flags
GitHub/Google buttons on the login page pointed at providers that may not be configured in Supabase, dead-ending in an error. Add NEXT_PUBLIC_OAUTH_GITHUB / NEXT_PUBLIC_OAUTH_GOOGLE (opt-in, "true" to show); a provider button renders only when enabled and the whole social block is hidden when neither is. Pure resolveOAuthProviders helper is unit-tested; flags documented in .env.example and DEPLOYMENT.md.
This commit is contained in:
@@ -24,6 +24,10 @@ All variables are listed in [.env.example](../.env.example). At minimum:
|
||||
- `SUPABASE_SERVICE_ROLE_KEY` — service-role JWT, server-side only
|
||||
- `NEXT_PUBLIC_APP_URL` — public URL of the deployed app, used in OAuth redirects
|
||||
|
||||
Optional:
|
||||
|
||||
- `NEXT_PUBLIC_OAUTH_GITHUB` / `NEXT_PUBLIC_OAUTH_GOOGLE` — set to `"true"` only for an OAuth provider you have actually configured in Supabase Auth. The login page hides any provider button that is not enabled, and hides the whole social-sign-in block if neither is set. These are build-time public values, so a change requires a redeploy to take effect.
|
||||
|
||||
## How a deploy runs
|
||||
|
||||
1. A developer pushes to `main`.
|
||||
|
||||
Reference in New Issue
Block a user