Supabase auth rescue

Supabase auth redirects to the wrong URL after domain change

Supabase ties auth flows to specific redirect URLs. Moving your app to a new domain without updating those settings breaks every authentication path.

What is probably broken

Login and signup worked on the old URL. After changing the domain, every auth flow redirects back to the old address or returns an error.

What production should look like

Auth flows working on the new domain with correct redirect URLs, OAuth callbacks, and email templates.

STEP 01

Find every Supabase auth redirect setting

Supabase has multiple places where redirect URLs are configured.

  • Check Site URL and additional redirect URLs in the Supabase auth dashboard.
  • List OAuth provider callback URLs (Google, GitHub, etc.).
  • Note email template redirect links (magic links, password reset).

STEP 02

Update Supabase for the new domain

Add the new domain to every Supabase auth setting.

  • Update Site URL to the new production domain.
  • Add new redirect URLs for each auth flow that needs them.
  • Update OAuth provider callback URLs in both Supabase and the provider dashboard.

STEP 03

Update the app and test

After fixing Supabase, the app also needs correct env vars and a rebuild.

  • Update Supabase URL env var on the server if it changed.
  • Rebuild the app and deploy the new build.
  • Test login, signup, password reset, OAuth, and magic links on the new domain.

Quick check

Is your app production-ready?

If you cannot tick all five, we can fix it. Send us the repo and we handle the rest.

  • ?Custom domain with HTTPS
  • ?Environment variables configured
  • ?Database wired and backed up
  • ?Auto-deploy on push
  • ?Smoke tested and live

Free checklist

Deploying this yourself?

Get the exact 5-step checklist we run before every deploy. No fluff, just the things that actually break.

No spam. Your email is only used to send the checklist.

Done-for-you deploy

RepoAssistant fixes Supabase auth during domain migration so users can log in on the new production URL.

Fixed price per repo. 24h delivery or full refund. No hourly billing.

Deploy my app

Related guides