Guide
v0 with Supabase: sign-in sends people to the wrong URL
Updated
On your v0 app, people who sign in or confirm their email are sent to a localhost or preview address instead of your live site.
Why it happens
v0 gives every working branch its own Vercel preview address, and publishing updates the production address, so the same app answers at several addresses. Supabase sends people to its Site URL when the code does not say where to go.
Possible causes
- The Site URL in Supabase is still the local default.
- The Vercel preview addresses are not on the Redirect URLs list.
- The sign-in code does not pass the address to return to, or builds it from the wrong value.
- The site address variable is not set in the production environment.
- The email templates use the Site URL instead of the redirect address the app sends.
You can't see it yourself
You're signed in, your customers aren't. You use the app on whichever address you built it on, which is usually on the allowed list. A new visitor starts from the production address.
Related: Sign-up or login broken after publishing: users bounce back to login or land on localhost · The confirmation link in my sign-up email opens localhost · It works in the preview but breaks after I deploy
VibeFix is independent. Lovable, Bolt, Replit, Base44, v0, Supabase, Firebase, Stripe and Vercel are trademarks of their owners.
Want it fixed?
Our AI agent finds the cause, fixes it in your code and re-checks your live app. $79 for one bug, paid up front. If we can't complete your re-check, you get your money back.
It starts with a free check that confirms the problem on your live app, no account needed.