Пример #1
0
 internal static async Task SignOut()
 {
     if (IsSignedIn)
     {
         _accessToken = null;
         await Authenticator.SignOutUserAsync();
     }
 }
        private async void SignOutButton_Click(object sender, RoutedEventArgs e)
        {
            if (CanSignOut)
            {
                DebugPrint("Signing out...");
                await _authenticator.SignOutUserAsync();

                AccessToken = null;
                DebugPrint("Signed out.");
            }

            NeedsToGetTicket         = true;
            SignOutButton.Visibility = CanSignOut ? Visibility.Visible : Visibility.Collapsed;
        }
Пример #3
0
        private async void SignOutButton_Click(object sender, RoutedEventArgs e)
        {
            if (CanSignOut)
            {
                DebugPrint("Signin out...");
                await _authenticator.SignOutUserAsync();

                Token = null;

                DebugPrint("Signed out.");
            }

            NeedsToGetTicket = (Token == null || Token.Length == 0);

            // Connected Account can't sign out from applications
            SignOutButton.Visibility = CanSignOut ? Visibility.Visible : Visibility.Collapsed;
        }