google log in for iphone (pc and android just works fine)
I've run into a tough issue that only affects iOS devices (both Safari and Chrome), and I'm hoping to get some advice on the best practice to solve it.
The Problem:
My React app uses Supabase Auth for Google Sign-In. The process works perfectly on PC and Android. However, on iPhones, after the user successfully authenticates with Google and is redirected back to my app, it gets permanently stuck on the initial loading screen and never navigates to after login page. The URL correctly shows the access_token in the hash, so the initial redirect is successful.
What I've Already Tried:
Verified URL Configuration: My Supabase Auth settings are correct (Site URL is set, and Redirect URLs includes the /** wildcard).
Fixed redirectTo: My signInWithOAuth call correctly uses options: { redirectTo: window.location.origin }.
Refactored Auth Logic: I've refactored my auth context and main app component to use onAuthStateChange as the single source of truth, eliminating any potential race conditions.
My Question:
What is the community's recommended, most robust pattern for solving this specific iOS post-login data fetching issue?
Any advice or examples would be greatly appreciated.
Thank you!
The Problem:
My React app uses Supabase Auth for Google Sign-In. The process works perfectly on PC and Android. However, on iPhones, after the user successfully authenticates with Google and is redirected back to my app, it gets permanently stuck on the initial loading screen and never navigates to after login page. The URL correctly shows the access_token in the hash, so the initial redirect is successful.
What I've Already Tried:
Verified URL Configuration: My Supabase Auth settings are correct (Site URL is set, and Redirect URLs includes the /** wildcard).
Fixed redirectTo: My signInWithOAuth call correctly uses options: { redirectTo: window.location.origin }.
Refactored Auth Logic: I've refactored my auth context and main app component to use onAuthStateChange as the single source of truth, eliminating any potential race conditions.
My Question:
What is the community's recommended, most robust pattern for solving this specific iOS post-login data fetching issue?
Any advice or examples would be greatly appreciated.
Thank you!