I have been looking for a good boilerplate on AngularJs with built-in registration and login and I found one, which works pretty well for my needs:
https://github.com/softwaremill/bootzooka/tree/master/ui
However, I cannot make it work because of line 8 in UserSessionService.js (https://github.com/softwaremill/bootzooka/blob/master/ui/app/session/userSessionService.js)
var loggedUserPromise = $http.get('api/users').then(function (response) {...
I edited it in this way:
var loggedUserPromise = $http.get('http://www.mybackend.com/login').then(function (response) {...
My server has only two routes, mybackend.com/login which gets username and password and retrieves an apikey, and mybackend.com/getuser which gets the apikey and returns various userdata.
The problem is that
var loggedUserPromise = $http.get('http://www.mybackend.com/login').then(function (response) {... always returns a 401 since the params (username and password) are not given.
What could it be the error?
Thank you all! :-)