Auth0 Home Blog Docs

Can't login on native client with user created via another client

login
username-password-co
clients

#1

I’ve created a user using a client that was set up for a web site. I’m attempting to login using another client that was set up for a mobile app. When I execute the following curl request that uses the same client_id that was used to create the user, it works fine:

curl -H "Host: ***.auth0.com" -H "Content-Type: application/json;charset=UTF-8" -H "Origin: https://***.***.com" -H "Accept: application/json, text/plain, */*" -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8" -H "Referer: https://***.***.com/***" -H "Accept-Language: en-ca" --data-binary '{"client_id":"***client_id_1","username":"***@***.com","password":"Pass123","connection":"Username-Password-Authentication","grant_type":"password","scope":"openid profile","popup":false}' --compressed https://***.auth0.com/oauth/ro

I get a 200 response with an id_token and access_token.

However, when I execute the same curl request, but replacing the client_id with the client_id of the native client, I get a 400 response with the following response body:

{"error":"invalid_request","error_description":"the connection was disabled"}

I figured that this would be resolved by just enabling the Username-Password-Authentication connection on the native client - however, I don’t see any Username-Password-Authentication connection in the list I can choose from. I also took a look on the client used by the website, and don’t see Username-Password-Authentication in it’s available list of connections either.

I verified via the Users page that the user I created is there, and that the connection listed for that user is Username-Password-Authentication.

Also, I verified that the two clients are both in the same Auth0 account.

Any ideas what I could be doing wrong here?


#2

I should mention, I also tried using /oauth/token instead of /oauth/ro, but got this response:

{"error":"invalid_request","error_description":"connection is disabled (client_id: *** - connection: Username-Password-Authentication)"}

#3

Have in mind that the shortcut to connections from within the settings of a client application will show you a subset of all the connections available on each category. If you have a lot of database connections, if I recall correctly more than 100 would lead to this, the connection in question may not appear there; in this situation you may try the other way around, go through the database connections, navigate to the page of results containing the connection you want, access its settings and on the clients section enable the desired ones.


#4

I actually looked at this both from the list of connections available to the client, and the other way around by looking at all the database connections on the account. In both list, there was no connection named “Username-Password-Authentication”, and yet when I look at the list of users, all of them list “Username-Password-Authentication” as their connection.


#5

I did notice that I’m seeing 6 full pages of results when I look at the Connections > Database list. Is that the most pages that it will display? Perhaps the Username-Password-Authentication is after the list page I can reach via pagination? If so, is there some other way that we can get to the management page for that connection?


#6

This turned out to be an embarrassing UI oversight on my part - I didn’t realize that the list of connections on each page was actually scrollable separate from the web page itself. When I was scrolling with my track pad it would just scroll to the bottom of the web page, because I had my mouse pointer outside of the separately scrollable list of connections. There’s no visual indication that the list is scrollable on my browser.

Once I realized it was scrollable, I was able to find the Username-Password-Authentication connection and enable it for the new client, and now all is working as expected.


#7