ng-token-auth icon indicating copy to clipboard operation
ng-token-auth copied to clipboard

auth headers not added after sign_in on safari 5.1

Open mikew75 opened this issue 9 years ago • 2 comments

When using safari 5.1, after registering a new user, I login my user, to post data to the backend. The post request that is being sent does not contain the auth header. it works fine for other more recent browser.

     $auth.submitRegistration($scope.user)
      .then((resp) ->
        # We auth user
        $auth.submitLogin({
          email: $scope.user.email,
          password: $scope.user.password
        }).then((resp) ->
          $http.post(ENV.apiEndpoint + "/api/v1/addresses", $scope.address)

mikew75 avatar Jan 19 '16 16:01 mikew75

Can reproduce this issue too. Any suggestion for a potential fix?

spolom avatar Feb 09 '16 16:02 spolom

One piece of advice to solve this issue: log all the response headers coming from your server with a http interceptor in Angular. See if you correctly log the access-token property after sign-in. Are you using Ionic? (see #255 ) Otherwise, check if your app store the access-token in the local-storage (or cookie) with the dev console in your browser.

gouroujo avatar Feb 17 '16 16:02 gouroujo