I am building an app using Back& as BaaS as well as using their authentication service. The login page is the root page, it's the first to load. While it runs fine on my local machine with "ionic serve" authorization does not work when running on a web server, neither on my local machine nor on Back&'s hosting service. Here's the code I'm using (straight from Back&'s example app):
this.backand.signin(this.username, this.password)
.then((res: any) => {
this.loggedInUser = res.data.username;
},
(error: any) => {
alert(error.data);
}
);
When attempting to login I get an empty error message. Interestingly anonymous auth works just fine (this.loggedInUser is 'Guest').
this.backand.useAnonymousAuth()
.then((res: any) => {
this.loggedInUser = res.data.username;
},
(error: any) => {
alert (error.data);
});
backand/angular2-sdk: v1.1.2