© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
mrgandalfandhi

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?
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

OAuth Page Redirect Issue
SupabaseSSupabase / help-and-questions
4y ago
Redirect after login
SupabaseSSupabase / help-and-questions
4y ago
google oauth redirect
SupabaseSSupabase / help-and-questions
4y ago
Session remains NotAuthenticated on iOS after OAuth login using supabase-kt
SupabaseSSupabase / help-and-questions
5mo ago