Ejemplo n.º 1
0
        private void Authorize(string targetUrl, bool clearExisting)
        {
            if (clearExisting)
            {
                WebViewHelper.ClearCookies();
                TokenHelper.ClearTokens();
                LocalConfiguration.IsLoggedInByFacebook = false;
            }

            var authorizationUrl = Authorization.GetAuthorizationUrl(targetUrl);

            WebViewHelper.Navigate(new Uri(authorizationUrl));
        }
Ejemplo n.º 2
0
        public static async void OnUnauthorizedError()
        {
            if (DateTime.UtcNow - lastNotifyToUser < minimumNotifyDelay)
            {
                return;
            }

            lastNotifyToUser = DateTime.UtcNow;

            TokenHelper.ClearTokens();

            var md = new MessageDialog("Please close and reopen Xpo Music; you may be asked to enter your credentials " +
                                       "again. In the meantime, some features might not work correctly.", "Authorization Error");
            await md.ShowAsync();
        }