15 lines
449 B
TypeScript
15 lines
449 B
TypeScript
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,
|
|
},
|
|
});
|
|
}
|