# How to force Auth0Client LoginAsync to show the login form every time

**URL:** <https://community.auth0.com/t/how-to-force-auth0client-loginasync-to-show-the-login-form-every-time/119191>\
**Category:** Get Help\
**Tags:** auth0-oidc-client-net, sdks-quickstarts\
**Created:** [October 23, 2023, 6:53pm UTC](https://community.auth0.com/t/how-to-force-auth0client-loginasync-to-show-the-login-form-every-time/119191 "2023-10-23T18:53:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kendyl.drayer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/kendyl.drayer/32/54148_2.png) [@kendyl.drayer](https://community.auth0.com/u/kendyl.drayer)\
**Post date:** [October 23, 2023, 6:53pm UTC](https://community.auth0.com/t/how-to-force-auth0client-loginasync-to-show-the-login-form-every-time/119191/1 "2023-10-23T18:53:33Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 27, 2023, 6:32pm UTC](https://community.auth0.com/t/how-to-force-auth0client-loginasync-to-show-the-login-form-every-time/119191/3 "2023-10-27T18:32:17Z")

</div>

Hi @kendyl.drayer,

Welcome to the Auth0 Community!

You can use the `prompt="login"` parameter to force the login prompt. Alternatively, you can use the logout endpoint to terminate the session if you need to do so.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [November 10, 2023, 6:32pm UTC](https://community.auth0.com/t/how-to-force-auth0client-loginasync-to-show-the-login-form-every-time/119191/4 "2023-11-10T18:32:50Z")

</div>

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