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