Exemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.state = AuthState.Generate();
            var builder = new UriBuilder("https", "id.twitch.tv");

            builder.Path = "oauth2/authorize";
            builder.AddQuery("client_id", client_id);
            builder.AddQuery("redirect_uri", redirect_uri);
            builder.AddQuery("response_type", useAuthFlow ? "code" : "token");
            builder.AddQuery("scope", "chat:read chat:edit whispers:read whispers:edit");
            builder.AddQuery("force_verify", "true");
            builder.AddQuery("state", this.state);
            Console.WriteLine(builder.Uri);
            this.Browser.Navigate(builder.Uri);
        }