feat(mobile): supabase client wired through async-storage session

This commit is contained in:
byGalax
2026-05-13 23:55:35 +02:00
parent 7ac93a95e6
commit 1e88941796
+16
View File
@@ -0,0 +1,16 @@
import { createClient } from '@chat-app/shared/supabase';
import { env } from './env';
import { sessionStorage } from './sessionStorage';
// Single Supabase client instance for the mobile app. Token storage goes
// to AsyncStorage so the session survives reboots. detectSessionInUrl is
// false because the magic-link callback is handled by our own
// app/auth/callback.tsx screen — Expo Router routes the deep link to
// that file, and we parse it explicitly.
export const supabase = createClient({
url: env.supabaseUrl,
anonKey: env.supabaseAnonKey,
sessionStorage,
detectSessionInUrl: false,
});