Issue on Mobile Devices using ionic framework

When I am trying to login with the mobile device with ionic framework getting following error message, in the browser it’s working perfectly

Error Log :: {“crossDomain”:true,“method”:“POST”,“url”:“https://xxxxxx.auth0.com/co/authenticate”}**

Here is the codebase

auth0 = new auth0.WebAuth({
clientID: AUTH_CONFIG.clientID,
domain: AUTH_CONFIG.domain,
responseType: ‘token id_token’,
redirectUri: ‘com.xxxxx.app://authlandingpage’,
packageIdentifier:‘com.xxxxx.app’,
callbackURL: ‘com.xxxxx.app://xxxx.us.auth0.com/cordova/com.xxxxxx.app/callback’,
scope: ‘openid email profile read:messages write:messages’,
});

this.auth0.redirect.loginWithCredentials({
  connection: 'Username-Password-Authentication',
  username: username,
  password: password
}, function(err, authResult) {

});

Thanks for your help.

Hey there!

Unfortunately I’m not an ionic guy but if you share with me the specific link for the framework you used, I can do some digging for you!

Here is the link for the ionic framework

Yep I know :slight_smile: But I meant Auth0 resources you used for your implementation

This application is build on Angular framework and Auth0 prospective we used “auth0-js” . Application is build on custom login page and we passing username/password for authentication

this.auth0.redirect.loginWithCredentials({
connection: ‘Username-Password-Authentication’,
username: username,
password: password
}

Hopefully it helps.