async private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            var location = Windows.ApplicationModel.Package.Current.InstalledLocation;

            coinbase = JToken.FromObject("");
            try
            {
                var file = await location.GetFileAsync("APIKeys.json");

                string json = await FileIO.ReadTextAsync(file);

#if DEBUG
                coinbase = JObject.Parse(json).SelectToken("coinbase_sandbox");
#else
                coinbase = JObject.Parse(json).SelectToken("coinbase");
#endif
            }
            catch (Exception)
            {
                NavigationTransitionInfo transition = new DrillInNavigationTransitionInfo();
                this.Frame.Navigate(typeof(MainPage), "Coinbase", transition);
            }
#if !TESTLOGIN && DEBUG
            NavigateToWallet((string)coinbase["developer_access_token"]);
#endif
            Uri coinBaseAuthURL = new Uri(string.Format("{0}oauth/authorize?response_type=code&client_id={1}&redirect_uri={2}&scope=wallet:accounts:read", coinbase["url"], coinbase["client_id"], coinbase["redirect"]));
            LoginWebView.Navigate(coinBaseAuthURL);
        }
Esempio n. 2
0
        private async Task ConnectAccountAsync(ServiceType serviceType)
        {
            // Generate State (for security)
            _stateVerification = new Random().Next(0, 100000000).ToString("D8");
            _loginService      = serviceType;

            // Create the URI
            var connectUri = string.Empty;

            switch (serviceType)
            {
            case ServiceType.SoundCloud:
                connectUri =
                    $"https://soundcloud.com/connect?scope=non-expiring&client_id={ApiKeyService.SoundCloudClientId}&response_type=code&display=popup&redirect_uri={_appCallback}&state={_stateVerification}";
                break;

            case ServiceType.Fanburst:
                connectUri =
                    $"https://fanburst.com/oauth/authorize?client_id={ApiKeyService.FanburstClientId}&response_type=code&redirect_uri={_appCallback}&state={_stateVerification}";
                break;
            }

            // Clear any webview cache
            await WebView.ClearTemporaryWebDataAsync();

            // Show the web view and navigate to the connect URI
            LoginWebView.Visibility = Visibility.Visible;
            LoginWebView.Navigate(new Uri(connectUri));
        }
Esempio n. 3
0
 private void ForwardButton_OnTapped(object sender, EventArgs e)
 {
     if (LoginWebView.CanGoForward)
     {
         LoginWebView.GoForward();
     }
 }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="service"></param>
        /// <param name="isRemoteConnect"></param>
        /// <param name="loginCode"></param>
        public LoginDialog(ServiceType service, bool isRemoteConnect = false, string loginCode = "")
        {
            // Set the login service type
            _loginService      = service;
            _stateVerification = new Random().Next(0, 100000000).ToString("D8");
            _isRemoteConnect   = isRemoteConnect;
            _loginCode         = loginCode;

            // Load the XAML page
            InitializeComponent();

            // Loading event handlers
            LoginWebView.NavigationStarting  += (sender, args) => { LoadingSection.Visibility = Visibility.Visible; };
            LoginWebView.NavigationCompleted += (sender, args) => { LoadingSection.Visibility = Visibility.Collapsed; };

            // Handle new window requests, if a new window is requested, just navigate on the
            // current page.
            LoginWebView.NewWindowRequested += (view, eventArgs) =>
            {
                eventArgs.Handled = true;
                LoginWebView.Navigate(eventArgs.Uri);
            };

            // Set the callback
            var appCallback = Uri.EscapeUriString("http://localhost/soundbyte");

            // Create the URI
            string connectUri;

            switch (_loginService)
            {
            case ServiceType.SoundCloud:
            case ServiceType.SoundCloudV2:
                connectUri =
                    $"https://soundcloud.com/connect?scope=non-expiring&client_id={AppKeysHelper.SoundCloudClientId}&response_type=code&display=popup&redirect_uri={appCallback}&state={_stateVerification}";
                break;

            case ServiceType.Fanburst:
                connectUri =
                    $"https://fanburst.com/oauth/authorize?client_id={AppKeysHelper.FanburstClientId}&response_type=code&redirect_uri={appCallback}&state={_stateVerification}&display=popup";
                break;

            case ServiceType.YouTube:
                connectUri =
                    $"https://accounts.google.com/o/oauth2/v2/auth?client_id={AppKeysHelper.YouTubeLoginClientId}&redirect_uri={appCallback}&response_type=code&state={_stateVerification}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube";
                break;

            case ServiceType.SoundByte:
                connectUri =
                    $"https://soundbytemedia.com/connect/authorize?client_id={AppKeysHelper.SoundByteClientId}&response_type=code&redirect_uri={appCallback}&state={_stateVerification}&scope=api%20offline_access";
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            // Show the web view and navigate to the connect URI
            LoginWebView.Visibility = Visibility.Visible;
            LoginWebView.Navigate(new Uri(connectUri));
        }
Esempio n. 5
0
        protected override void OnCreate(object parameter)
        {
            base.OnCreate(parameter);
            var requri = new Uri("https://m.weibo.cn/login?backURL=https%253A%252F%252Fm.weibo.cn%252F");

            LoginWebView.NavigationCompleted += LoginWebViewOnNavigationCompleted;
            LoginWebView.Navigate(requri);
        }
Esempio n. 6
0
 private void BackButton_OnTapped(object sender, EventArgs e)
 {
     // Check to see if there is anywhere to go back to
     if (LoginWebView.CanGoBack)
     {
         LoginWebView.GoBack();
     }
 }
Esempio n. 7
0
        public MainWindow()
        {
            InitializeComponent();

            _login       = new LoginWebView();
            _login.Done += _login_Done;

            Loaded += MainWindow_Loaded;
        }
Esempio n. 8
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);

            // Clear the cache
            await WebView.ClearTemporaryWebDataAsync();

            // Navigate to the connect url
            LoginWebView.Navigate(new Uri(Vm.AuthenticationDetails.ConnectUrl));
        }
Esempio n. 9
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            var args = (AccountViewParams)e.Parameter;

            // Set the login service type
            _loginService      = args.Service;
            _stateVerification = new Random().Next(0, 100000000).ToString("D8");

            // Create the URI
            string connectUri;

            // Hide new login system for now
            AccountV3Section.Visibility = Visibility.Collapsed;

            switch (_loginService)
            {
            //soundbyte://authorization/lastfm

            case ServiceTypes.SoundCloud:
            case ServiceTypes.SoundCloudV2:
                connectUri = $"https://soundcloud.com/connect?scope=non-expiring&client_id={AppKeys.SoundCloudClientId}&response_type=code&display=popup&redirect_uri={AppKeys.AppLegacyCallback}&state={_stateVerification}";
                break;

            case ServiceTypes.YouTube:
                connectUri = $"https://accounts.google.com/o/oauth2/v2/auth?client_id={AppKeys.YouTubeLoginClientId}&redirect_uri={AppKeys.AppLegacyCallback}&response_type=code&state={_stateVerification}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube";
                break;

            case ServiceTypes.SoundByte:
                connectUri = $"https://soundbytemedia.com/connect/authorize?client_id={AppKeys.SoundByteClientId}&response_type=code&redirect_uri={AppKeys.AppLegacyCallback}&state={_stateVerification}&scope=api%20offline_access";
                break;

            default:
                throw new ArgumentOutOfRangeException();
            }

            //// Only these services are supported at the moment
            //if (_loginService == ServiceType.SoundByte
            //    || _loginService == ServiceType.Spotify)
            //{
            //    AccountV3Section.Visibility = Visibility.Visible;
            //    await Launcher.LaunchUriAsync(new Uri(connectUri));
            //}
            //else
            //{
            // Clear cache
            await WebView.ClearTemporaryWebDataAsync();

            // Show the web view and navigate to the connect URI
            LoginWebView.Visibility = Visibility.Visible;
            LoginWebView.Navigate(new Uri(connectUri));
            // }
        }
Esempio n. 10
0
 private async void LoginWebView_LoadCompleted(object sender, NavigationEventArgs e)
 {
     if (e.Uri.AbsoluteUri.Contains("passport.cnblogs.com"))
     {
         //若是登录页面,则设置用户名和密码
         string js = @"var username =document.getElementById('input1');
             if(username!= null && username!='undefined')
             username.value='" + _loginViewModel.UserName + "';" +
                     @"var password =document.getElementById('input2');
             if(password!= null && password!='undefined')
             password.value='" + _loginViewModel.Password + "';";
         await LoginWebView.InvokeScriptAsync("eval", new string[] { js });
     }
     LoginCompleted();
 }
        public Task <AuthorizeResponse> RequestTokenAsync(string scope, string responseType)
        {
            LoginWebView webview = null;
            var          task    = StartSTATask <AuthorizeResponse>(() =>
            {
                Application app = new Application();
                webview         = new LoginWebView();
                webview.RequestToken(m_clientId, m_authorizeEndpoint, scope, responseType, m_callback);
                app.Run(webview);

                return(webview.Completion.Result);
            });

            return(task);
        }
Esempio n. 12
0
        public AccountView()
        {
            InitializeComponent();

            // Loading event handlers
            LoginWebView.NavigationStarting  += (sender, a) => { LoadingSection.Visibility = Visibility.Visible; };
            LoginWebView.NavigationCompleted += (sender, a) => { LoadingSection.Visibility = Visibility.Collapsed; };

            // Handle new window requests, if a new window is requested, just navigate on the
            // current page.
            LoginWebView.NewWindowRequested += (view, eventArgs) =>
            {
                eventArgs.Handled = true;
                LoginWebView.Navigate(eventArgs.Uri);
            };
        }
Esempio n. 13
0
        /// <summary>
        /// 检查登录状态
        /// </summary>
        public async void CheckLoginStatus()
        {
            string login_js = "var o = document.getElementById('tip_btn');if(o) o.innerText;";

            loginResult = await LoginWebView.InvokeScriptAsync("eval", new string[] { login_js });

            if (loginResult.Contains("成功"))
            {
                return;
            }

            // 每隔100毫秒检测下状态
            await Task.Delay(100);

            CheckLoginStatus();
        }
Esempio n. 14
0
        /// <summary>
        /// Creates the authorization request and shows the popup with the Web View.
        /// When the login is succesfully complete triggers you the LoginDone event.
        /// </summary>
        public void Login(string scope, string responseType)
        {
            const string redirectUri = "oob://localhost/wpf.webview.client";

            var request = new RequestUrl($"{AppSettings.Settings.Endpoint}identity/connect/authorize");

            var startUrl = request.CreateAuthorizeUrl(
                clientId: AppSettings.Settings.ClientId,
                responseType: responseType,
                scope: scope,
                redirectUri: redirectUri,
                nonce: CryptoRandom.CreateUniqueId());

            _login       = new LoginWebView();
            _login.Done += _login_Done;
            _login.Show();
            _login.Start(new Uri(startUrl), new Uri(redirectUri));
        }
Esempio n. 15
0
        private void LoginWebView_OnLoaded(object sender, RoutedEventArgs e)
        {
            using (var db = new CacheDbContext())
            {
                if (db.SessionInfo.Any())
                {
                    var sessionInfo = db.SessionInfo.First();
                    if (!string.IsNullOrWhiteSpace(sessionInfo.AccessToken))
                    {
                        AuthWithKnownToken(sessionInfo);
                        return;
                    }
                }
            }

            LoginWebView.Navigate(new Uri(
                                      $"https://oauth.vk.com/authorize?client_id={VkConstants.AppId}&display=page&scope={VkConstants.AppScope}&redirect_uri=https://oauth.vk.com/blank.html&response_type=token&v=5.103&state=success"
                                      ));
        }
Esempio n. 16
0
        public AccountView()
        {
            // Load the XAML page
            InitializeComponent();

            LoginWebView.NavigationStarting += (sender, args) => { LoadingSection.Visibility = Visibility.Visible; };

            LoginWebView.NavigationCompleted += (sender, args) => { LoadingSection.Visibility = Visibility.Collapsed; };

            // Handle new window requests, if a new window is requested, just navigate on the
            // current page.
            LoginWebView.NewWindowRequested += (view, eventArgs) =>
            {
                eventArgs.Handled = true;
                LoginWebView.Navigate(eventArgs.Uri);
            };

            // Set the callback
            _appCallback = Uri.EscapeUriString("http://localhost/soundbyte");
        }
Esempio n. 17
0
        private void NavigationWithCookies()
        {
            Uri uri = new Uri(WcfApiUrlConstants.LoginUrl);
            //var httpBaseProtocolFilter = new HttpBaseProtocolFilter();
            //httpBaseProtocolFilter.UseProxy = true;
            var httpRequestMessage = new HttpRequestMessage(HttpMethod.Get, uri);
            var userAgent          = "Mozilla/5.0 (Windows Phone 10.0; Android 6.0.0; WebView/3.0; Microsoft; Virtual) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10240 sample/1.0";

            httpRequestMessage.Headers.Add("User-Agent", userAgent);
            if (_loginViewModel.IsLogin && _loginViewModel.Cookies != null)
            {
                //如果用于已经登陆,则请求带上当前用户的Cookies
                foreach (Cookie c in _loginViewModel.Cookies)
                {
                    HttpCookiePairHeaderValue httpCookie = new HttpCookiePairHeaderValue(c.Name, c.Value);
                    httpRequestMessage.Headers.Cookie.Add(httpCookie);
                }
            }
            LoginWebView.NavigateWithHttpRequestMessage(httpRequestMessage);
        }
Esempio n. 18
0
        /// <summary>
        /// 执行登录操作
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private async void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
        {
            try
            {
                // 用户名
                string js = "document.getElementById('input1').setAttribute('value', '" + UserInputTextBox.Text + "');";
                // 密码
                js += "document.getElementById('input2').setAttribute('value', '" + PasswordInptutBox.Password + "');";
                // 点击登录
                js += "document.getElementById('signin').click();";

                // 执行脚本文件
                await LoginWebView.InvokeScriptAsync("eval", new string[] { js });

                CheckLoginStatus();
            }
            catch (Exception ex)
            {
                await new MessageDialog(ex.Message).ShowAsync();
            }
        }
Esempio n. 19
0
        public LoginView()
        {
            this.InitializeComponent();
            DataContext = ViewModel;
            //Values can be found at https://github.com/settings/applications

            _clientId     = ApiKeysManager.GithubClientId;
            _clientSecret = ApiKeysManager.GithubClientSecret;
            _client       = new GitHubClient(new ProductHeaderValue("gitit"));
            while (ApiKeysManager.GithubClientId == null)
            {
            }
            var loginRequest = new OauthLoginRequest(_clientId)
            {
                Scopes = { "user", "notifications", "repo", "gist", "read:org" }
            };

            var oAuthLoginUrl = _client.Oauth.GetGitHubLoginUrl(loginRequest);

            LoginWebView.Navigate(oAuthLoginUrl);
            LoginWebView.NavigationCompleted += LoginWebViewOnNavigationCompleted;
        }
Esempio n. 20
0
        private async void LoginWebView_NavigationCompleted(WebView sender, WebViewNavigationCompletedEventArgs args)
        {
            if (args.Uri.OriginalString == "https://www.coolapk.com/")
            {
                var dialog = new ContentDialog {
                    Title   = "是否登录完成",
                    Content = "检测到你可能已经完成登录",
                    IsPrimaryButtonEnabled   = true,
                    IsSecondaryButtonEnabled = true,
                    PrimaryButtonText        = "验证状态",
                    SecondaryButtonText      = "重试"
                };
                var result = await dialog.ShowAsync();

                if (result == ContentDialogResult.Primary)
                {
                    AppBarButton_Tapped(null, null);
                }
                else if (result == ContentDialogResult.Secondary)
                {
                    LoginWebView.Navigate(new Uri("https://account.coolapk.com/"));
                }
            }
        }
Esempio n. 21
0
        public AccountView()
        {
            // Load the XAML page
            InitializeComponent();

            LoginWebView.NavigationStarting += (sender, args) => { LoadingSection.Visibility = Visibility.Visible; };

            LoginWebView.NavigationCompleted += (sender, args) => { LoadingSection.Visibility = Visibility.Collapsed; };

            // On disconnect and connect events refresh the UI
            SoundByteV3Service.Current.OnServiceConnected    += (type, token) => RefreshUi();
            SoundByteV3Service.Current.OnServiceDisconnected += type => RefreshUi();

            // Handle new window requests, if a new window is requested, just navigate on the
            // current page.
            LoginWebView.NewWindowRequested += (view, eventArgs) =>
            {
                eventArgs.Handled = true;
                LoginWebView.Navigate(eventArgs.Uri);
            };

            // Set the callback
            _appCallback = Uri.EscapeUriString("http://localhost/soundbyte");
        }
Esempio n. 22
0
 public Login()
 {
     this.InitializeComponent();
     LoginWebView.Navigate(new Uri(_login_url_jumpHome));
 }
Esempio n. 23
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // Get the account type
            var accountType = e.Parameter?.ToString();

            if (string.IsNullOrEmpty(accountType))
            {
                accountType = "soundcloud";
            }

            TelemetryService.Current.TrackPage("Login Page");

            // Generate State (for security)
            var stateVerification = new Random().Next(0, 100000000).ToString("D8");

            // Generate Application callback URI
            var callback = Uri.EscapeUriString("http://localhost/soundbyte");

            // Create the URI
            var connectUri = new Uri(accountType == "soundcloud"
                ? $"https://soundcloud.com/connect?scope=non-expiring&client_id={Common.ServiceKeys.SoundCloudClientId}&response_type=code&display=popup&redirect_uri={callback}&state={stateVerification}"
                : $"https://fanburst.com/oauth/authorize?client_id={Common.ServiceKeys.FanburstClientId}&response_type=code&redirect_uri={callback}&state={stateVerification}");

            // Navigate to the connect URI
            LoginWebView.Navigate(connectUri);

            // Handle new window requests, if a new window is requested, just navigate on the
            // current page.
            LoginWebView.NewWindowRequested += (view, eventArgs) =>
            {
                eventArgs.Handled = true;
                LoginWebView.Navigate(eventArgs.Uri);
            };

            // Called when the webview is going to navigate to another
            // Uri.
            LoginWebView.NavigationStarting += async(view, eventArgs) =>
            {
                // If we are navigating to google, let the user know that google login is not supported
                if (eventArgs.Uri.Host == "accounts.google.com")
                {
                    // Cancel the page load and hide the loading panel
                    eventArgs.Cancel          = true;
                    LoadingSection.Visibility = Visibility.Collapsed;
                    TelemetryService.Current.TrackEvent("Google Sign in Attempt");
                    await new MessageDialog("Google Account sign in is not supported. Please instead signin with a Facebook or SoundCloud account.", "Sign in Error").ShowAsync();
                }

                // We worry about localhost addresses are they are directed towards us.
                if (eventArgs.Uri.Host == "localhost")
                {
                    // Cancel the navigation, (as localhost does not exist).
                    eventArgs.Cancel = true;

                    // Parse the URL for work
                    // ReSharper disable once CollectionNeverUpdated.Local
                    var parser = new QueryParameterCollection(eventArgs.Uri);

                    // First we just check that the state equals (to make sure the url was not hijacked)
                    var state = parser.FirstOrDefault(x => x.Key == "state").Value;

                    // The state does not match
                    if (string.IsNullOrEmpty(state) || state.TrimEnd('#') != stateVerification)
                    {
                        // Display the error to the user
                        await new MessageDialog("State Verfication Failed. This could be caused by another process intercepting the SoundByte login procedure. Sigin has been canceled to protect your privacy.", "Sign in Error").ShowAsync();
                        TelemetryService.Current.TrackEvent("State Verfication Failed");
                        // Close
                        LoadingSection.Visibility = Visibility.Collapsed;
                        App.GoBack();
                        return;
                    }

                    // We have an error
                    if (parser.FirstOrDefault(x => x.Key == "error").Value != null)
                    {
                        var type   = parser.FirstOrDefault(x => x.Key == "error").Value;
                        var reason = parser.FirstOrDefault(x => x.Key == "error_description").Value;

                        // The user denied the request
                        if (type == "access_denied")
                        {
                            LoadingSection.Visibility = Visibility.Collapsed;
                            App.GoBack();
                            return;
                        }

                        // Display the error to the user
                        await new MessageDialog(reason, "Sign in Error").ShowAsync();

                        // Close
                        LoadingSection.Visibility = Visibility.Collapsed;
                        App.GoBack();
                        return;
                    }

                    // Get the code from the url
                    if (parser.FirstOrDefault(x => x.Key == "code").Value != null)
                    {
                        var code = parser.FirstOrDefault(x => x.Key == "code").Value;

                        // Create a http client to get the token
                        using (var httpClient = new HttpClient())
                        {
                            // Set the user agent string
                            httpClient.DefaultRequestHeaders.UserAgent.Add(new ProductInfoHeaderValue("SoundByte", Package.Current.Id.Version.Major + "." + Package.Current.Id.Version.Minor + "." + Package.Current.Id.Version.Build));

                            // Get all the params
                            var parameters = new Dictionary <string, string>
                            {
                                { "client_id", accountType == "soundcloud" ? Common.ServiceKeys.SoundCloudClientId : Common.ServiceKeys.FanburstClientId },
                                { "client_secret", accountType == "soundcloud" ? Common.ServiceKeys.SoundCloudClientSecret :  Common.ServiceKeys.FanburstClientSecret },
                                { "grant_type", "authorization_code" },
                                { "redirect_uri", callback.ToString() },
                                { "code", code }
                            };

                            var encodedContent = new FormUrlEncodedContent(parameters);

                            // Post to the soundcloud API
                            using (var postQuery = await httpClient.PostAsync(accountType == "soundcloud" ? "https://api.soundcloud.com/oauth2/token" : "https://fanburst.com/oauth/token", encodedContent))
                            {
                                // Check if the post was successful
                                if (postQuery.IsSuccessStatusCode)
                                {
                                    // Get the stream
                                    using (var stream = await postQuery.Content.ReadAsStreamAsync())
                                    {
                                        // Read the stream
                                        using (var streamReader = new StreamReader(stream))
                                        {
                                            // Get the text from the stream
                                            using (var textReader = new JsonTextReader(streamReader))
                                            {
                                                // Used to get the data from JSON
                                                var serializer = new JsonSerializer
                                                {
                                                    NullValueHandling = NullValueHandling.Ignore
                                                };

                                                // Get the class from the json
                                                var response = serializer.Deserialize <SoundByteService.Token>(textReader);

                                                // Create the password vault
                                                var vault = new PasswordVault();

                                                if (accountType == "soundcloud")
                                                {
                                                    // Store the values in the vault
                                                    vault.Add(new PasswordCredential("SoundByte.SoundCloud", "Token", response.AccessToken.ToString()));
                                                    vault.Add(new PasswordCredential("SoundByte.SoundCloud", "Scope", response.Scope.ToString()));
                                                }
                                                else
                                                {
                                                    // Store the values in the vault
                                                    vault.Add(new PasswordCredential("SoundByte.FanBurst", "Token", response.AccessToken.ToString()));
                                                }

                                                LoadingSection.Visibility = Visibility.Collapsed;
                                                TelemetryService.Current.TrackEvent("Login Successful", new Dictionary <string, string>()
                                                {
                                                    { "service", accountType }
                                                });
                                                App.NavigateTo(typeof(HomeView));
                                            }
                                        }
                                    }
                                }
                                else
                                {
                                    // Display the error to the user
                                    await new MessageDialog("Token Error. Try again later.", "Sign in Error").ShowAsync();

                                    // Close
                                    LoadingSection.Visibility = Visibility.Collapsed;
                                    App.GoBack();
                                }
                            }
                        }
                    }
                }
            };
        }
 public void NavigateWebView(Uri uri)
 {
     LoginWebView.Navigate(uri);
 }
Esempio n. 25
0
 private async Task <string> InvokeScriptAsync(string js)
 {
     return(await LoginWebView.InvokeScriptAsync("eval", new string[] { js }));
 }
Esempio n. 26
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     LoginWebView.Navigate(new Uri("https://api.soundcloud.com/connect?client_id=1d57801f1cc71e123c1b9c58aa45c8e7&redirect_uri=&response_type=code_and_token"));
 }
Esempio n. 27
0
 private void LoginWebView_OnLoaded(object sender, RoutedEventArgs e)
 {
     LoginWebView.Navigate(new Uri(
                               $"https://oauth.vk.com/authorize?client_id={VkConstants.AppId}&display=page&scope={VkConstants.AppScope}&redirect_uri=https://oauth.vk.com/blank.html&response_type=token&v=5.103&state=success"
                               ));
 }
Esempio n. 28
0
 private void Dialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args)
 {
     LoginWebView.Navigate(new Uri("https://account.coolapk.com/"));
 }
Esempio n. 29
0
 private void AppBarButtonClearLoginState_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e)
 {
     App.AppViewModel.Logout();
     LoginWebView.Navigate(new Uri("https://account.coolapk.com/"));
 }