Repository navigation
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched the Docs, GitHub
Discussions, and
Discord.
Describe the bug
Email confirmation redirect URLs configured in Authentication > URL Configuration get reset
unexpectedly on preview branches. After configuring custom redirect URLs, they revert to
localhost:3000, causing confirmation emails to contain incorrect redirect links.
This issue occurs specifically on preview branches (not the main production branch).
Note: This bug is difficult to reproduce on demand. The reset happens intermittently and
I haven't been able to identify the exact trigger. It could be related to branch syncing,
deployments, or some scheduled background process.
To Reproduce
- Create a preview branch in Supabase Dashboard
- Go to Authentication > URL Configuration
- Set custom Site URL and Redirect URLs (e.g.,
https://my-preview-app.vercel.app) - Save the configuration
- Wait some time (the reset timing is unpredictable — could be hours or days)
- Check the URL Configuration again — values have reverted to
localhost:3000 - Trigger a confirmation email — the redirect URL in the email points to
localhost:3000
instead of the configured URL
Important: The exact conditions that trigger the reset are unknown. The issue has been
observed multiple times but not consistently reproducible.
Expected behavior
Once configured, the Site URL and Redirect URLs should persist indefinitely and not reset to
default values. Confirmation emails should always use the configured redirect URLs.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- OS: macOS
- Browser: Chrome
- Version of supabase-js: 2.90.1
- Version of Node.js: 22.13.1
- Supabase Project: Preview branch (not main/production)
Additional context
- This does NOT occur on the main production branch — only on preview branches
- The reset seems to happen silently without any user action or notification
- This breaks the email confirmation flow for preview/staging environments, making it
difficult to test auth flows properly - Multiple occurrences have been observed, but the trigger remains unclear
Activity
[-]Authentication URLs reset in non-production branches[/-][+][Auth] URLs reset in non-production branches[/+]Siddx6 commentedon Feb 1, 2026
I'm experiencing this same issue. Happy to help investigate and fix it.
Questions that might help diagnose:
Does it happen after deployments/commits to the preview branch?
Related to branch syncing from production?
Any scheduled tasks that reset preview branch configs?
I can help by:
Monitoring when resets occur and logging the exact triggers
Investigating the codebase if someone points me to where preview branch auth config is handled
Submitting a PR once we identify the root cause
Let me know where to start looking in the code!
r-bart commentedon Feb 1, 2026
Uhmm.
The flow I've followed is:
Hope it helps.
It's really annoying.
Thank you!
Siddx6 commentedon Feb 1, 2026
@r-bart Got it! I'll watch my preview branches and note when this happens. Can someone point me to where preview branch settings are stored in the code? Happy to help fix this