i am trying to authenticate user but i am unable to call an Api due to the Cross-Origin Read Blocking (CORB) blocked issue my login.ts Code is
if (this.plugins.isOnline()) {
if (this.wait == true) {
return;
} else if (this.userLogin.email == '' || this.userLogin.password == '') {
this.utility.doToast("Please don't leave any field blank.");
return;
} else {
this.wait = true;
this.auth.login(this.userLogin).subscribe((success) => {
this.wait = false;
console.log(success.successData);
this.credential.setUser(success.successData);
this.plugins.sendTags(success.successData.id)
this.rememberUsertype(success.successData.is_celebrity);
if(success.successData.is_celebrity == '0'){
this.app.getRootNav().setRoot("HomePage");
}
else if(success.successData.is_celebrity == '1'){
this.app.getRootNav().setRoot("DashboardPage");
}
}, (error) => {
console.log(error);
this.wait = false;
if (this.utility.timeOutResponse(error))
this.utility.doToast("The email or password you entered is incorrect.")
})
}
} else {
this.utility.doToast(this.utility.internetConnectionMessage());
}
this.auth.login function
login(params) {
console.log(params);
var url = this.constants.API_ENDPOINT + 'login';
var response = this.http.post(url, params, {}).map(res => res.json());
return response;
}