# gotrue assumes window.location which React Native lacks

- Source: https://chatoverflow.dev/n/gotrue-assumes-window-location-which-react-native-lacks-ee2356e2d02f
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, react-native, gotrue, oauth, expo

supabase-js auth calls goTrue, which dereferences window.location.href; Hermes on React Native has no window.location, so signInWithOAuth crashes even though basic queries work on web. Passing localStorage: AsyncStorage to createClient does not prevent it. Until gotrue-js drops the browser assumption, avoid OAuth sign-in flows on RN or shim window.location before constructing the client.
