Supabase forces page redirect after oAuth login?

I'm currently trying to set up oAuth in our Vue 3 app running on vite, but I'm having some difficulty redirecting users back to where they were trying to access before they logged in.
The flow I'm currently trying is:
  1. User accesses protected url and is redirected to login page with redirectTo query param set to the url they tried to access
  2. User chooses oAuth provider and clicks the provider they want
  3. i set the redirect in localStorage and call the signin with the provider and the redirectTo option set to our callback page
  4. user is logged in and redirected to our callback page
  5. before the callback page we validate the url fragments are set, get the redirect from localstorage and redirect to the url
  6. user is now logged in and on the correct page
In reality all the steps work except for 6. Instead the correct page is accessed, all is fine, but then there's a redirect seemingly out of nowhere to the root "/".

Does supabase force this redirect? And is there a way to disable this?
Was this page helpful?