23 lines
599 B
TypeScript
23 lines
599 B
TypeScript
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
import { createClient } from '@supabase/supabase-js';
|
|
import { getMobileSupabaseConfig } from '../../shared/supabase-config.js';
|
|
|
|
const supabaseConfig = getMobileSupabaseConfig();
|
|
|
|
if (!supabaseConfig.isConfigured) {
|
|
console.warn('[mobile] Missing Supabase environment variables');
|
|
}
|
|
|
|
export const mobileSupabase = createClient(
|
|
supabaseConfig.url,
|
|
supabaseConfig.anonKey,
|
|
{
|
|
auth: {
|
|
storage: AsyncStorage,
|
|
persistSession: true,
|
|
autoRefreshToken: true,
|
|
detectSessionInUrl: false,
|
|
},
|
|
}
|
|
);
|