Ionic Cloud Auth $ionicAuth.login very slow or not working in iOS

Hi everybody,

Login in my app using Ionic Cloud Auth ( $ionicAuth.login) in iOs is not working or just sometimes we can log in after more than a minute! However it works properly in Android.

// Perform the login action when the user submits the login form
            $scope.doLogin = function () {

                $scope.loginResultadoOK = false;

                var loginData = {
                    "theusername": $scope.loginData.theusername,
                    "thepass": $scope.loginData.thepass,
                var loginOptions = {'inAppBrowserOptions': {'hidden': true}};

                $timeout(function () {
                    if ($scope.loginResultadoOK != true) {
                }, 10000);

                $ionicAuth.login('custom', loginData, loginOptions).then($scope.loginOK, $scope.loginKO);

I know that this method uses inAppBrowser. I have tried to uninstall the plugin and install it again but still not working. I have made a lot of changes but no way, it remains connecting and I event do not get any error.

The app tries to connect against and against my server. When Ionic calls my server script, this script sends an email but in this case I’m not getting any email. It seems that something is blocking my calls in my app.

The config.xml includes this:

 <access origin="*"/>
  <access origin="*" subdomains="true"/>
  <allow-navigation href="*://*"/>

I will much appreciate any help, I have been trying to fix it for long.

Thanks again.

Hi everybody,

Finally, I read this post and I solved the error:

It seems that in iOS promises were not working so I downloaded bluebird and included in my index.html:

<script src="lib/bluebird.3.4.1.min.js"></script>

Now, both in iOS and in Android is working properly.

Thank you anyway, hope this info can help others searching for this.