You cannot inject a custom session into the Supabase client like this
export const supabase = createClient<Database>(config.supabaseUrl, config.supabaseKey, { global: typeof window !== 'undefined' ? { fetch: fetchWithSession } : undefined });