Watch: Fix login emails that send users to localhost | Vovy

Watch Vovy do it on a Mac: "My login links go to localhost:3000 in production, fix it". Vovy fixes the Site URL and Redirect URLs in Supabase so confirmation, reset and OAuth links land on your live app, including Vercel previews.

"My login links go to localhost:3000 in production, fix it"

Vovy fixes the Site URL and Redirect URLs in Supabase so confirmation, reset and OAuth links land on your live app, including Vercel previews.

What happens in the video

  1. Find where the redirect comes from: Vovy reads your code in Cursor for emailRedirectTo and redirectTo values and checks whether they're hardcoded to localhost.
  2. Set the Site URL: It opens Authentication, URL Configuration in Supabase and changes Site URL, the default place auth links send people, to your live domain.
  3. Add allowed Redirect URLs: Vovy adds your production URL, localhost for development, and a wildcard for Vercel preview links so every environment is allowed.
  4. Make the code use the current domain: In Cursor it replaces hardcoded localhost with window.location.origin or an environment variable, so each deploy points to itself.
  5. Test on production: Vovy triggers a password reset on your live site and confirms the email link opens your real domain, then shows a before and after card.
Read the step-by-step guide