Ionic Custom Auth with inAppBrowser hidden doesnt fire error callback on 401
When using Ionic Auth with custom authentication, and hiding the inAppBrowser to use Ionic forms vs web forms, the error callback is not firing when the auth script returns a 401 error.
var loginOptions = {'inAppBrowserOptions': {'hidden': true}};
$ionicAuth.login('custom', userLogin, loginOptions).then(function (data) {
Alert.showAlert('Success',JSON.stringify(data));
},function(err){
Alert.showAlert('Failed:',JSON.stringify(err));
});
The ionic cloud docs do not go into error handling, but according to the examples given, the auth script should return a 401 error along with an error and code. I wanted to use my forms from the app and according to the docs could do so by hiding the inAppBrowser and receiving the error message through the error callback function.
https://forum.ionicframework.com/t/ionic-custom-auth-not-working-on-fail/63830
Ionic version 1.3.1 Android
Your system information:
Cordova CLI: 6.3.0 Gulp version: CLI version 3.9.1 Gulp local: Local version 3.9.1 Ionic Framework Version: 1.3.1 Ionic CLI Version: 2.0.0 Ionic App Lib Version: 2.0.0 OS: Windows 7 SP1 Node Version: v4.4.7
This issue was moved to driftyco/ionic-cloud-issues#189