`redirectTo` for localhost not working on Discord OAuth flow despite options being set
authSolved🟡javascript
Hello. I am trying to setup local and production authentication on the same hosted Supabase instance. I know this is not a good practice, but it is how the project is currently set up.
I am doing Discord OAuth sign in. For that, I use the following code on my login page:
On the Supabase project settings, the site URL is set to the production URL, and
http://localhost:3001/auth/callback
http://localhost:3001/auth/callback
has been added to the Redirect URLs on the URL configuration section.
The problem is that when I run the project locally, the sign-in button does not redirect to localhost again, but to the production app instead, as set in the URL configuration site URL. As such, I can't log in locally.
I have looked at the other similar issues to no avail. I don't know what I'm doing wrong.
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.