init
This commit is contained in:
14
src/lib/supabaseFactory.ts
Normal file
14
src/lib/supabaseFactory.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import 'react-native-url-polyfill/auto';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import { createClient, type SupabaseClient } from '@supabase/supabase-js';
|
||||
|
||||
export function makeSupabase(url: string, anonKey: string): SupabaseClient {
|
||||
return createClient(url, anonKey, {
|
||||
auth: {
|
||||
storage: AsyncStorage,
|
||||
autoRefreshToken: true,
|
||||
persistSession: true,
|
||||
detectSessionInUrl: false,
|
||||
},
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user