I have a Windows Forms app using Auth0.OidcClient.WinForms to login to Auth0. Something seems to be getting cached and sometimes the login form doesn’t show.
Desired
LoginAsync() opens the browser window so the user sees the login form every time.
Actual
LoginAsync() sometimes does not open the browser window and the user is logged in automatically.
This is a problem because we’re seeing this issue: if the user gives the wrong email and receives “access_denied”, they will get this message forever. They never get a chance to see the login form again.
There’s nothing special about the code. Most of it came from the quickstart:
Auth0ClientOptions clientOptions = new Auth0ClientOptions
{
Domain = _domain,
ClientId = _clientId
};
_client = new Auth0Client(clientOptions);
clientOptions.PostLogoutRedirectUri = clientOptions.RedirectUri;
...
var extraParameters = new Dictionary<string, string>(); extraParameters.Add("organization", orgID);
...
LoginResult loginResult = await _client.LoginAsync(extraParameters: extraParameters);
How can I ensure the login form will pop up every time?