Google login sends your live app back to localhost? The Supabase setting that fixes it

Your app is deployed, Google sign-in works, and then the browser lands on localhost:3000 and shows nothing. Supabase did that on purpose. Why it…

Aliteq
Glitch · Gadgets & Creators Editor

The short answer

When Google login on your deployed app drops you on localhost, Supabase is falling back to its Site URL. After Google approves the sign-in, Supabase only sends the user to an address it trusts: one…

The cause: your live address is not trusted, so Supabase uses the Site URL, still set to localhost

The fix: Authentication, URL Configuration in the Supabase dashboard: Site URL = your live domain

Also list: the www version, your preview links and your laptop, in Redirect URLs

Check your code: a redirectTo that hardcodes localhost sends everyone there too

Do not fix it by trusting everything

It is tempting to add a pattern like https://** so the problem goes away. Do not. The list exists so sign-in only hands users back to sites you own. Use your exact live address, the exact www…

Aliteq

Read the full story

Google login sends your live app back to localhost? The Supabase setting that fixes it

Read the full story on Aliteq