DEV Community

VibeFix
VibeFix

Posted on Edited on Originally published at vibe-fixer.com

Login broken after publishing: users land back on the login page

Login worked in the preview. On the live site, users sign in and end up back on the login page, on a localhost address, or on an error. Or the confirmation link in the email opens the wrong site.

Why it happens

When someone signs in, your login service (usually Supabase) sends them back to your app. For safety, it only sends people to addresses on an approved list. Your preview address is on that list. Your published address often isn't, so the service falls back to its default, which is often localhost.

Confirm it

  • After signing in, look at the address bar. If it says localhost:3000 or your preview domain, this is the cause.
  • Open the confirmation email a new user receives and check where the link points.

Fix it (Supabase)

  1. Open your Supabase project → Authentication → URL Configuration.
  2. Set Site URL to your live address, e.g. https://myapp.com.
  3. Under Redirect URLs, add your live address and, if you use more than one, each of them (with and without www).
  4. If you use Google sign-in, check the Google Cloud console lists the callback URL that Supabase shows you.
  5. Sign up with a fresh email on the live site and go through the whole flow once.

If it still fails

Some apps hard-code the preview address in the sign-in code. Ask your builder: "Find every place the code builds a redirect or callback URL and make it use the live site's address."

Sign-up is the one step every customer must pass. ## Still broken?

App broke after you published it? Our AI agent fixes it in your code, then tests your live app again so you see the result yourself. The first check is free. vibe-fixer.com

Lovable, Bolt, Replit, Base44, v0 and Supabase are trademarks of their owners.

Originally published at vibe-fixer.com. I'm building VibeFix, an AI agent that finds what is breaking your live app, fixes it in your code and re-checks it.

Top comments (0)