Fix · Supabase and databases
Redirect URL not allowed after sign in or email link
Not checked against the vendor's current screens
What you may see
- After clicking the email link I land on localhost or on an error
- Google or magic link sign-in returns to the wrong site
Most likely cause
The address the user returns to is not in the project's allowed list, so Supabase falls back to the main Site URL (often still localhost).
Check first (about two minutes)
- In the Authentication settings find the URL configuration (Site URL and Redirect URLs).
- Check the address in the failing link: which domain does it use?
The fix prompt
What you type here never leaves your browser. The search runs on this page, and nothing is sent to a server or to an AI.
Kept only in this browser, on this device. Keys and passwords are removed before anything is saved.
Prompt language
Paste it into Claude, ChatGPT, Gemini or Cursor, then follow what it says.
After you tried it, did it work?
Steps
- Find in the code where redirect addresses are built (emailRedirectTo, redirectTo, callback routes).
- Tell me the exact addresses to add to the allowed list: the live domain, the www version, and localhost for development.
- Set the main Site URL to the live address.
- Make the code use the current site address, not a hard-coded one.
Do not do this
- Do not use old links to test; request a new one each time.
- Do not allow a wildcard for every address.