WPF Sdk Error for custom domain login

Hi,

We are using Auth0 Universal Login for login to a WPF app. The app we created has a custom domain which we have to use for login.

The login screen appears in Windows 10 machine but in Windows 7 machine, it throws error. The error is on connecting to openid-configuration. I am pasting the error below:

Error loading discovery document: Error connecting to https://{custom-domain}/.well-known/openid-configuration: An error occurred while sending the request.

Message : The underlying connection was closed: An unexpected error occurred on a send.
StackTrace : at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)
System.IO.IOException
Message : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
StackTrace : at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
System.Net.Sockets.SocketException
Message : An existing connection was forcibly closed by the remote host
StackTrace : at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)

When we login with the default Auth0 domain (.auth0.com), then no error occurs but this issue only happens when we are using custom domain.

platform - WPF
Auth0.OidcClient.WPF version - v2.4.3
IdentityModel - v3.10.10

Code for login:

auth0Client = new Auth0Client(new Auth0ClientOptions
{
Domain = Settings.Default.Auth0Domain,
ClientId = Settings.Default.Auth0ClientID,
Scope = “openid email”,
});

loginResult = await auth0Client.LoginAsync();

Can somebody guide on this error, as what we are missing/ or what should be done for custom domain to enable this login in Windows 7 machine?