public async Task <string> GetToken() { var token = await JsRuntimeCurrent.GetToken(); this.IsLoggedIn = token != null; onStatusChanged?.Invoke(); return(token); }
private async Task <bool> AddToken() { var token = await JsRuntimeCurrent.GetToken(); if (token == null) { return(false); } HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); return(true); }