ng-token-auth
ng-token-auth copied to clipboard
auth headers not added after sign_in on safari 5.1
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)
Can reproduce this issue too. Any suggestion for a potential fix?
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.