React Native / Expo support
brunoprietog opened this issue ยท 3 comments
brunoprietog commented
๐ Feature description
Hello!
Can this sdk be used with React Native? I was thinking that things like authentication with oauth providers would not work.
Thanks!
๐ค Pitch
Perhaps some alternative methods could be implemented for executions in these environments.
๐ Have you spent some time to check if this issue has been raised before?
- I checked and didn't find similar issue
๐ข Have you read the Code of Conduct?
- I have read the Code of Conduct
rohankm commented
As react native does not have window.localstorage, implementing the same with
AsyncStorage from '@react-native-async-storage/async-storage'; would be more sense.
i was checking the docs of supabase. This is how they did it
import AsyncStorage from '@react-native-async-storage/async-storage';
import { createClient } from '@supabase/supabase-js'
const supabaseUrl = YOUR_REACT_NATIVE_SUPABASE_URL
const supabaseAnonKey = YOUR_REACT_NATIVE_SUPABASE_ANON_KEY
export const supabase = createClient(supabaseUrl, supabaseAnonKey, {
localStorage: AsyncStorage as any,
autoRefreshToken: true,
persistSession: true,
detectSessionInUrl: false,
});
implementing something like this would be helpful
stnguyen90 commented
@brunoprietog, cookies should work automatically in react native. Would you be able to verify if oauth doesn't work in react native?
stnguyen90 commented
Closing in favor of some of the other React Native issues