PhoneGap Custom UI Auth0 login Issue

We are trying to implement Auth0 login using Custom UI in our PhoneGap application. We are observing the below issue:

  1. With new accounts we see that the API oauth/ro is deprecated
  2. With Old accounts, we are receiving 400 error


                  url: LoginURL,
                  cache: false,
                  method: 'POST',
                  data: {
                      username: uname,
                      password: pwd,
                      connection: 'Username-Password-Authentication',
                      grant_type: 'password',
                      scope: 'openid',
                     // device: '',
                  headers: {
                      "Content-Type": "application/json",
           }).success(function (response) { 

Should we install any plugin/or add any configurations to Config.xml?

The usage of oauth/ro endpoint as you showed in your sample snippet has been superseded by performing a resource owner password credentials grant at the /oauth/token endpoint. If you’re interested in specifying a target database connection you should use the extension grant type that support a realm parameter.

In relation to the error itself, you should update your question with additional information as just the status code is insufficient to point to the root cause of the issue. For example, if the uname variable depicted contains an empty string than you would get a 400 error because you would not be specifying a username, however, this is just a guess.

Hi ,
As you suggested ,Tried with following:
username: uname,
password: pwd,
grant_type: ‘password’,
scope: ‘openid’,
Got below Error:
“error”: “access_denied”,
“error_description”: “Unauthorized”

By setting Default directory as Username-Password-Authentication.
We are not using any database.What do we need to set in Default directory?Do we need to do any settings? Please help us.

You’re not providing a client secret so you need to ensure that the client application is not configured to required client authentication at the token endpoint. If it is, then that would explain your error; you can check the Token Endpoint Authentication Method field in the client settings.