1

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

E. Tallas
  • 23
  • 3
  • Any console errors? – Sampath Apr 17 '17 at 05:09
  • Nope, none. Console log is empty, server side exceptions is empty. I do see an API request in the request log for "/1/table/data/backandRoles?filter=&pageNumber=1&pageSize=20&sort=" – E. Tallas Apr 17 '17 at 11:30
  • Can you also include the code where you initialize the SDK? The most likely culprit here is a misconfigured API signup key. Also, does anything show in your app's dashboard? Specifically in the exception log? – Matt Billock Apr 17 '17 at 21:23

1 Answers1

0

I feel kind of stupid that I haven't tested it earlier - the issue only shows up when using Chrome on my dev machine, no issue if using any other browser on that same machine, or even the same version of Chrome but on a different machine. Sorry for wasting your time guys!

E. Tallas
  • 23
  • 3
  • Found the issue - it was caused by Privacy Badger (an extension to protect from trackers). Once disabled it worked in Chrome as well. – E. Tallas Apr 19 '17 at 17:15