angular-sailsjs-boilerplate icon indicating copy to clipboard operation
angular-sailsjs-boilerplate copied to clipboard

AuthInterceptor and user token not passed

Open shyamrock opened this issue 9 years ago • 1 comments

I have written updatePassword in AuthService.js: updatePassword: function updatePassword(credentials) {

        return $http
          .post(BackendConfig.url + '/updatePassword', credentials, {withCredentials: false})
          .then(
          function(response) {

            //var msg = response.data.message
            MessageService.success('Your Password Changed Successfully!');

            //$localStorage.credentials = response.data;
          }
        )
          ;
      }

The call is getting into server side however the request.token on server is failing and looks like User is not passed. Where and how does Authinterceptor send this data, I did check local storage does have user credentials.

shyamrock avatar Mar 05 '16 11:03 shyamrock

There is an interceptor to add that to each request https://github.com/tarlepp/angular-sailsjs-boilerplate-frontend/blob/master/src/app/core/interceptors/AuthInterceptor.js

tarlepp avatar Mar 05 '16 12:03 tarlepp