Auth rescue guide

Lovable + Supabase auth broke after changing domains

Supabase auth ties itself to specific redirect URLs and origins. Moving a Lovable app to a new domain without updating those settings breaks every login flow.

What is probably broken

Login and signup worked in Lovable preview. After moving to a custom domain, every auth flow returns errors or redirects to the old URL.

What production should look like

Auth flows working on the production domain with correct redirect URLs, env vars, and row-level security policies.

STEP 01

Find every Supabase auth setting

Auth depends on multiple settings across the Supabase dashboard and your app code.

  • List all auth providers enabled in your Supabase project.
  • Copy the current redirect URLs, callback URLs, and allowed origins.
  • Note which env vars the app uses for Supabase URL and keys.

STEP 02

Update Supabase for the new domain

Supabase will reject auth requests from any URL not in its allow list.

  • Add the production domain to Supabase auth redirect URLs.
  • Update OAuth provider callback URLs to the new domain.
  • Remove or keep old preview URLs depending on whether you still need them.

STEP 03

Fix the app and test every flow

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

  • Update Supabase URL and anon key env vars on the server.
  • Rebuild the app with production env vars loaded.
  • Test signup, login, password reset, OAuth, and magic links on the live 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 Lovable + Supabase auth during deployment so users can actually log in on your production domain.

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

Deploy my app

Related guides