Auth0.OidcClient.WPF - Keys stopped working in Login page


Currently modernizing a windows desktop application using Auth0.OidcClient.WPF 3.x. Login works as it should but I’ve noticed that some keys e.g tab, enter, ctrl+v have suddenly stopped working in the login page.

The problem started when I wanted to position and resize the form with the login page. I created a WebBrowserBrowser object and passed it with the options to Auth0Client.

To reproduce I 've written a minimal winforms app similar to the one in the quickstart quide. Snippet below:

var browser = new WebBrowserBrowser(() => new Window()
Name = “WebAuthentication”,
Title = “Login test”,
Width = 500,
Height = 420,
WindowStartupLocation = WindowStartupLocation.CenterScreen

        var opts = new Auth0ClientOptions
            Domain = _domain,
            ClientId = _clientId,
            Browser = browser // Setting this causes keys to stop working?! 
        _client = new Auth0Client(opts);
        await _client.LoginAsync();

Am I doing something wrong here? Is this a bug? Keys works as long as you don’t pass any browser in options.


The application uses both WPF and WinForms components. If I can I avoid using WinForms so I used the Auth0.OidcClient.WPF package. No errors or warnings. Everything seemed to work. After experimenting I changed to the Auth0.OidcClient.WinForms package and the keys started working again?!

Had to modify the code a bit for WinForms.

var browser = new WebBrowserBrowser(() => new Form
    Name = "WebAuthentication",
    Text = "Login test",
    Width = 500,
    Height = 420,
    StartPosition = FormStartPosition.CenterScreen 

Don’t know why it previously failed but I can now position and resize the login window so I’ll leave it at that.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.