Files
mdb/src/lib/supabaseFactory.ts
Bastien COIGNOUX bd325fe456 init
2026-05-03 20:18:33 +02:00

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,
},
});
}