If Supabase sends your production login back to localhost, start with Authentication → URL Configuration → Site URL. Supabase uses Site URL as the default when your code does not specify redirectTo. Change the development value to your intended production URL, then check the actual redirectTo value and its entry in Redirect URLs. [1]
Keep the provider callback separate from the app callback. In Supabase's Google OAuth setup, Google returns to Supabase's callback; Supabase then returns the user to your app. Changing one does not configure the other. [2]
Find the setting for the redirect that is wrong
Use this order for your own project. Compare only the scheme, hostname and path. Do not paste passwords, keys, session tokens, authorization codes, URL query strings or fragments into a diagnostic tool or support message.
| What you see | Check next | What belongs there |
|---|---|---|
No explicit redirectTo in the sign-in call | Supabase Site URL | Your intended production default URL. [1] |
| Your code requests the wrong app URL | The deployed sign-in code and the value it supplies | The app destination intended for that environment. [1] |
| Your code requests the right app URL, but that destination is not being used | Supabase Redirect URLs | An entry covering the intended callback, including its path. [1] |
| Google rejects its configured redirect URI | Google's Authorized redirect URIs | The Supabase callback shown on your project's Google provider page. [2] |
| The browser reaches your app callback but login is unfinished | Your app's callback implementation | For the documented PKCE flow, a code exchange that saves the session. [2] |
A wrong destination and an unfinished session are different observations. Record which one you have before changing settings.
Set the production default and the app callback
In Supabase URL Configuration, check Site URL first. Do not leave the production default pointing at your development server. Next, identify the destination the deployed app actually supplies to Supabase. The redirect documentation requires that redirectTo match the configured Redirect URLs list. [1]
For a Google OAuth app using the documented PKCE flow, the destination is an app route that handles the code exchange. This synthetic example uses /auth/callback; use the route your app actually implements. [2]
await supabase.auth.signInWithOAuth({
provider: 'google',
options: {
redirectTo: 'https://app.example.test/auth/callback'
}
})The example domain is a placeholder. For this example, the production configuration would be:
| Setting | Example value |
|---|---|
| Site URL | https://app.example.test/ |
| Redirect URLs entry | https://app.example.test/auth/callback |
Code's redirectTo | https://app.example.test/auth/callback |
The Site URL here is a default destination, not the callback implementation. If the flow needs the app callback, supply that callback explicitly and implement it.
Prefer an exact production redirect path. Compare the full value, including http versus https, the hostname, the path and any trailing slash. Supabase documents wildcards, but recommends exact production redirect paths. [1]
Check the values used by the deployed app, not just the development copy. If the code builds its destination from configuration, inspect the resolved destination locally without logging auth query strings or fragments. Correct that source and redeploy through your usual release process.
Keep Google's callback pointed at Supabase
For the Google OAuth flow described here, open your project's Google provider settings in Supabase and copy its callback URL into Google's Authorized redirect URIs. Use the value Supabase shows for your project; do not replace it with your app's /auth/callback. Google's Authorized JavaScript origins is a separate field for your application's origin. [2]
The roles are:
Google → Supabase provider callback → your app callbackFor illustration only, the two callback paths could be shown as:
Supabase side:
https://auth.example.test/auth/v1/callbackApp side:
https://app.example.test/auth/callback
These are synthetic hosts, not values to paste into a real provider console.
In the documented PKCE flow, the app callback handles exchangeCodeForSession. Supabase's Google guide provides framework-specific callback examples. Its implicit flow is different; do not add a server callback solely because this example uses one. Follow the guide for the flow your app actually uses. [2]
If the problem is an email link
Site URL also matters for confirmation and password-reset destinations. If a custom email template still builds its link from {{ .SiteURL }}, changing a per-request redirect alone may not change the link that template produces. Supabase's redirect guide documents when a template may need {{ .RedirectTo }} instead. [1]
Inspect the template and the destination together. Preserve the confirmation or recovery handling required by your app; do not replace the whole link with a bare homepage. Request a fresh test email after an approved change and inspect the result privately. Do not share the full confirmation or recovery URL.
Keep preview permissions narrow
For production, use exact redirect paths. For previews, start with an explicit callback URL for each preview you intend to authorize. Remove entries when those previews are retired.
Supabase also documents scoped patterns for Vercel teams/accounts and Netlify sites. If you use a pattern, restrict it to your own deployment namespace and the needed paths. A wildcard covering every Vercel deployment is not an appropriate substitute for identifying your previews. Supabase's pattern syntax treats dots and slashes as separators, so do not assume a single star covers every nested path. [1]
A synthetic before-and-after URL check
We ran this literal-matching fixture with synthetic addresses. It checks whether the requested string appears in the example allow-list. It does not run Supabase, implement its full redirect validation or fallback rules, or reproduce a live OAuth login.
Before, the list contains only:
https://app.example.test/After, it contains the intended production callback and one explicit preview callback:
https://app.example.test/auth/callback
https://preview-42.example.test/auth/callback| Requested URL | Literal match before | Literal match after |
|---|---|---|
https://app.example.test/auth/callback | No | Yes |
https://app.example.test/auth/callback/ | No | No |
https://www.example.test/auth/callback | No | No |
http://app.example.test/auth/callback | No | No |
https://app.example.test/auth/callback/extra | No | No |
https://preview-42.example.test/auth/callback | No | Yes |
https://preview-43.example.test/auth/callback | No | No |
https://app.example.test/ | Yes | No |
The result shows why writing down exact destinations helps: adding the intended callback does not also add the slash variant, another hostname or the next preview. The final row describes only list membership; it does not say Supabase will reject a URL that qualifies through another runtime rule.
Use a configuration checker as a second check
The free third-party Supabase Redirect Doctor compares values you supply for Site URL, the allow-list, app callback and provider settings. Its publisher describes it as client-side analysis of supplied configuration, not a connection to your live project. [3]
Use sanitized configuration only. Do not paste credentials or auth query strings, and do not use its share-link feature for private configuration. Its page says that feature encodes the configuration into the URL. [3]
Do not copy its broad preview or production wildcard suggestions into your configuration. The checker currently suggests an all-Vercel preview pattern and a production origin with a wildcard path. Supabase recommends exact production redirect paths and documents more narrowly scoped preview patterns. Keep the exact entries above or carefully scope your own previews. [1][3]
A checker result does not establish that login completes or that a user's access permissions are correct. After configuration changes, test the intended flow in your own app and confirm both the destination and the resulting session. Use the launch checklist for the separate access-control checks.
If the destination instead fails with a certificate warning before the app opens, use the custom-domain SSL checker for a domain you own. It checks DNS and certificates for that domain and its www twin. It does not verify Supabase redirect settings, app code or authentication. [4]
Need help with the auth repair?
If the wrong redirect is part of a stalled production launch, request the Production Readiness Audit. Describe which flow fails and where it should land, without sending credentials or complete auth URLs. See the existing offer page for scope and terms. [5]
How we checked this
This diagnosis follows Supabase's Redirect URLs and Google sign-in documentation, read on 1 November 2026. The URL table is our executed synthetic literal-matching test, not a live OAuth reproduction or a client incident. We did not sign in, change production configuration or verify a live session. The third-party checker's published interface and matching suggestions were assessed against those vendor documents; that is not a full security or privacy audit. [1][2][3]
Sources
Redirect URLs, Supabase. Publication date not stated; read 1 November 2026.
Sign in with Google, Supabase. Publication date not stated; read 1 November 2026.
Supabase Auth Redirect Doctor and its linked diagnostic source, ARLing. Publication dates not stated; read 1 November 2026.
Custom Domain SSL Checker, Enviera. Publication date not stated; read 1 November 2026.
Prototype to Production, Enviera. Publication date not stated; read 1 November 2026.