# Native app UWP Universal login returns BadRequest on wrong password but Classic login works

**URL:** <https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842>\
**Category:** Get Help\
**Tags:** oidc, login, universal-login\
**Created:** [January 26, 2021, 9:47pm UTC](https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842 "2021-01-26T21:47:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbentley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cbentley/32/15274_2.png) [@cbentley](https://community.auth0.com/u/cbentley)\
**Post date:** [January 26, 2021, 9:47pm UTC](https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842/1 "2021-01-26T21:47:07Z")

</div>

I created a UWP app with the Auth0.OidcClient.UWP Nuget package, as the quickstart for UWP shows. The app was configured with Universal login on the dashboard by default. It works fine if you enter the credentials correctly. I get the access token and the login window closes. If you enter the password wrong, you would expect to see a message, but the window closes and returns with “BadRequest”. If I switch to the Classic login window, and type a password incorrectly, I get a warning message and am allowed to retype the password.

This is my code:  
var authClient = new Auth0Client(new Auth0ClientOptions  
{  
Domain = “my domain”,  
ClientId = “my client id”  
});

var extraParameters = new Dictionary\<string, string\>();  
extraParameters.Add(“connection”, “Username-Password-Authentication”);  
extraParameters.Add(“audience”, “my API audience ID”);

var loginResult = await authClient.LoginAsync(extraParameters: extraParameters);

//This has BadRequest when using Universal login and typing a bad password  
[//loginResult.Error](https://loginResult.Error)

I read that this might be caused by a missing ‘state’ parameter on non-UWP forums. But, my understanding is that the ‘state’ parameter is automatically handled in the Oidc SDK. I don’t see anywhere to set it in the client if not. Thanks for any suggestions.

---

<div class="post-metadata">

**Author:** ![cbentley](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/cbentley/32/15274_2.png) [@cbentley](https://community.auth0.com/u/cbentley)\
**Post date:** [February 12, 2021, 1:05pm UTC](https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842/2 "2021-02-12T13:05:11Z")

</div>

This was resolved with latest version of the Oidc Nuget package.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 12, 2021, 1:52pm UTC](https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842/3 "2021-02-12T13:52:06Z")

</div>

Glad to hear that and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 25, 2021, 10:27am UTC](https://community.auth0.com/t/native-app-uwp-universal-login-returns-badrequest-on-wrong-password-but-classic-login-works/56842/4 "2021-02-25T10:27:17Z")

</div>


