support-storage-client.ts 687 B

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