Redirect URL configuration

Hi, In my web app, I’m using Login with LinkedIn for Auth with Supabase. I have set up the URL configuration in Superbase which allows me to redirect to the right page post-auth. I am having issues using different auth flows. For example: - If I log in from the staging website, I would like the Supabase Auth to redirect to the staging website post auth. - If I log in from the production domain, I would like the Supabase Auth to redirect to the production domain What I have tried: - I set the site URL to the production domain and added Redirect URLs to the staging domain- I am using Weweb for the front end builder and there I have a condition to check the URL where the button is being clicked and have set the redirect URL based on the base URL calling the auth function Issue:- The redirect always defaults to a page on the site URL and ignores the other redirect urls Any pointers on how I can implement conditional authentication flows?
3 Replies
garyaustin
garyaustin3mo ago
You should make sure you Additional Redirect URL settings have exact matches or use wildcards to match.
Abhishek Sahni (Abhi)
I have used both exact matches and wildcards for the Additional Redirect URL but that hasn't worked. Supabase always redirects to pages on the site URL
garyaustin
garyaustin3mo ago
Then you are doing something wrong in your call. If you change the siteURL and go to that address then redirectTo is not being done in the call or does not match exactly the full URL (http included) in the additional URLs. You probably need to show your call and your redirect URL settings.

Did you find this page helpful?