Skip to content

Commit 368e765

Browse files
fix(auth): enable Google OAuth + expand redirect allowlist (#196)
- Enable Google OAuth provider in Supabase cloud (config.toml + push) - Allowlist: localhost, default Vercel, branch glob, bare prod custom domain - Dedup redundant git-main entry (covered by glob wildcard) Fixes ERR_CONNECTION_REFUSED OAuth loop: Vercel NEXT_PUBLIC_APP_URL was empty, causing callbackUrl() to fall back to localhost site_url — Supabase rejected the redirect and dropped users on localhost root with ?code= in query. Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 794f763 commit 368e765

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

supabase/config.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ site_url = "http://localhost:3000"
155155
# A list of *exact* URLs that auth providers are permitted to redirect to post authentication.
156156
additional_redirect_urls = [
157157
"http://localhost:3000/auth/callback",
158+
"https://smartmanagementsystem-emiyakiritsugu3s-projects.vercel.app/auth/callback",
158159
"https://smartmanagementsystem-*-emiyakiritsugu3s-projects.vercel.app/auth/callback",
159160
"https://smartmanagementsystem.vercel.app/auth/callback"
160161
]
@@ -313,6 +314,12 @@ max_frequency = "5s"
313314
# Use an external OAuth provider. The full list of providers are: `apple`, `azure`, `bitbucket`,
314315
# `discord`, `facebook`, `github`, `gitlab`, `google`, `keycloak`, `linkedin_oidc`, `notion`, `twitch`,
315316
# `twitter`, `x`, `slack`, `spotify`, `workos`, `zoom`.
317+
[auth.external.google]
318+
enabled = true
319+
client_id = "687532012962-b0q21ukr717vvnhnn45ecif23nehvq0q.apps.googleusercontent.com"
320+
secret = "env(SUPABASE_AUTH_EXTERNAL_GOOGLE_CLIENT_SECRET)"
321+
skip_nonce_check = false
322+
316323
[auth.external.apple]
317324
enabled = false
318325
client_id = ""

0 commit comments

Comments
 (0)