/users/login gives exception XMLHttpRequest cannot load Request header field Authorization

Hi Jeff,

It appears you’re adding the Authorization header (do you?):

$http.defaults.headers.common['Authorization'] = 'Basic ' + authdata;

Any particular reason you’re not using the Backendless SDK for JS?

With the SDK you could simply replace the following line:

return $http.post(‘[url=http://api.backendless.com/.../login']api.backendless.com/.../login'[/url], user).then(handleSuccess, handleError('Error user login'))

with:

Backendless.UserService.login(user).then( handleSuccess, handleError( 'Error user login' ))

If you’re going to do that, make sure to enable promises in the app initialization logic with the following call:

Backendless.enablePromises()