support-storage-client.ts21 lines · main
1import { createClient, type SupabaseClient } from '@supabase/supabase-js'
2
3export const createSupportStorageClient = (): SupabaseClient => {
4 const SUPPORT_API_URL = process.env.NEXT_PUBLIC_SUPPORT_API_URL || ''
5 const SUPPORT_API_KEY = process.env.NEXT_PUBLIC_SUPPORT_ANON_KEY || ''
6
7 return createClient(SUPPORT_API_URL, SUPPORT_API_KEY, {
8 auth: {
9 persistSession: false,
10 autoRefreshToken: false,
11 // @ts-expect-error
12 multiTab: false,
13 detectSessionInUrl: false,
14 localStorage: {
15 getItem: (_key: string) => undefined,
16 setItem: (_key: string, _value: string) => {},
17 removeItem: (_key: string) => {},
18 },
19 },
20 })
21}