public async Task <bool> UpdateToken() { var userInfo = await JsRuntime.GetUserInfoAsync(); var response = await RefreshToken(userInfo.RefreshToken); if (!response.IsSuccessStatusCode) { await JsRuntime.RemoveUserInfoAsync(); return(false); } var result = JsonConvert.DeserializeObject <AuthSuccessResponse>(await response.Content.ReadAsStringAsync()); await JsRuntime.SetUserInfoAsync(new UserInfo { Token = result.Token, RefreshToken = result.RefreshToken, Email = userInfo.Email }); return(true); }