Custom login failure function


In my app I use custom authentication. This works great. The only problem is, that when a user enters wrong credentials, the in app browser is shown instead the failure function is called. How can I fix this issue?

the code looks like this:
Ionic.Auth.login('custom', authOptions, data) .then(function () { ... }, function () { alert('Anmeldung fehlgeschlagen'); $scope.closeLogin(); });

Best regards

I am experiencing the same thing using custom authentication and setting the inAppBrowserOption to hidden=true. The success function works but when it fails the fail function is not called.

var loginOptions = {'inAppBrowserOptions': {'hidden': true}};
$ionicAuth.login('custom', userLogin, loginOptions).then(function (data) {


Any getting this resolved? Having the same issue!