Home

using external browser or webview2

edited March 2021

I want to fiddle with OAuth2 protected REST APIs and use a OID Client library that needs an IBrowser implementation to collect the external IDP credentials.
I got that to work in a WPF App but:

How would I do that in LinqPad?

tried roughly like this, but the window remains empty or STA thread errors.

             using Microsoft.Web.WebView2.WinForms;

             var signinWindow = new System.Windows.Window()
        {
            Width = 800,
            Height = 600,
            Title = "Sign In",
            WindowStartupLocation = WindowStartupLocation.CenterScreen
        };

        var webView = new WebView2();
        //(....)
        signinWindow.Content = webView;
        signinWindow.Show();

Comments

Sign In or Register to comment.