Questions about Auth0.OidcClient

Hi - I have a couple of questions about the Auth0 nuget package for WinForms.

  1. Is it possible to make the authentication dialog modal?

  2. Is it possible for the redirect url to be called from code rather
    than through a browser?

  3. How can I stop logins with a particular provider from being
    remembered?

Thanks
G

1 Like

1 - Is it possible to make the authentication dialog modal?

Unfortunately not out of the box. However your are more than welcome to use the source code of PlatformWebView.cs and copy it to your project renaming it to something like ModalPlatformWebView. Then you can call the method ShowDialog() instead of Show() in the line 101.

An instance of this new ModalPlatformWebView should be passed in the Auth0ClientOptions:

var client = new Auth0Client(new Auth0ClientOptions
{
    Domain = "",
    ClientId = "",
    Browser = new ModalPlatformWebView()
});

2 - Is it possible for the redirect url to be called from code rather than through a browser?

These callbacks are HTTP 302 redirects defined in the OAuth2 specification. As a result the browser is required in order to perform the redirects.

3 - How can I stop logins with a particular provider from being remembered?

Currently this is not possible in Lock. The remember me functionality is applied to all the available connections.

  1. Thanks - This is very helpful :slight_smile:
  2. This makes sense - although this could be performed by a browser that’s embedded in-app and then hidden from user view (It’d be a smoother experience, although I imagine providers like Google would frown upon it)
  3. This is actually quite a blocker/pain point - Is there some sort of nonce mechanism that could be applied on the back-end to invalidate this setting?

Thanks
G

1 Like