private async void AuthManager_TokenStatusChanged(object sender, TokenStatusEventArgs args) { App.LogService.Write($"Provider: {args.ProviderKey}, Old: {args.OldValue}, New: {args.NewValue}"); var msa = AuthManager.GetProvider(ProviderNames.MsaProviderKey); bool isMsaValid = msa.IsTokenValid(); LiveUserInfo userInfo = null; if (isMsaValid) { userInfo = await LiveApiUtil.GetUserInfoAsync(await AuthManager.GetProvider(ProviderNames.MsaProviderKey).GetTokenSilentAsync()); } var aad = AuthManager.GetGraphProvider(); bool isAadValid = (aad != null) ? aad.IsTokenValid() : false; // Update the UI PageService?.SetSignInStatus(isMsaValid, isAadValid, userInfo?.name); }
private async void AuthManager_TokenStatusChanged(object sender, TokenStatusEventArgs e) { await UpdateUiAsync(); }