using Microsoft.AspNetCore.Components.WebAssembly.Authentication; using RobotNet.Clients; namespace RobotNet.WebApp.Clients; public abstract class WebAssemblyHubClient(IAccessTokenProvider tokenProvider, Uri uri) : HubClient(uri, async () => { var tokenResult = await tokenProvider.RequestAccessToken(); return tokenResult.TryGetToken(out var token) ? token.Value : ""; }) { }