feat(mobile): supabase client wired through async-storage session
This commit is contained in:
@@ -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,
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user