React Native + Expo + Supabase Auth

Hi all,

I was trying to use rn+expo and implement supabase Authentication but when I add the call to get session:

useEffect(() => {
db.auth.getSession().then(({ data: { session } }) => {
setSession(session)
})

db.auth.onAuthStateChange((_event, session) => {
setSession(session)
})
}, [])

I get the error message "window is not defined". This only happens on Web dev build, on Android it works fine
image.png
Was this page helpful?