{"action":"created","issue":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/16","labels_url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/16/comments","events_url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/16/events","html_url":"https://github.com/stormpath/stormpath-sdk-angularjs/issues/16","id":79015981,"number":16,"title":"Make an option to use auth-header instead of cookies","user":{"login":"AlmaasAre","id":1777366,"avatar_url":"https://avatars.githubusercontent.com/u/1777366?v=3","gravatar_id":"","url":"https://api.github.com/users/AlmaasAre","html_url":"https://github.com/AlmaasAre","followers_url":"https://api.github.com/users/AlmaasAre/followers","following_url":"https://api.github.com/users/AlmaasAre/following{/other_user}","gists_url":"https://api.github.com/users/AlmaasAre/gists{/gist_id}","starred_url":"https://api.github.com/users/AlmaasAre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlmaasAre/subscriptions","organizations_url":"https://api.github.com/users/AlmaasAre/orgs","repos_url":"https://api.github.com/users/AlmaasAre/repos","events_url":"https://api.github.com/users/AlmaasAre/events{/privacy}","received_events_url":"https://api.github.com/users/AlmaasAre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-21T14:21:43Z","updated_at":"2015-05-21T21:33:02Z","closed_at":null,"body":"I have the API on a different URL than the angular application. Cookies don't work very well with different host names between the FE and the API. Would be nice if i had the option of sending the token in an auth-header instead of a cookie."},"comment":{"url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/comments/104426424","html_url":"https://github.com/stormpath/stormpath-sdk-angularjs/issues/16#issuecomment-104426424","issue_url":"https://api.github.com/repos/stormpath/stormpath-sdk-angularjs/issues/16","id":104426424,"user":{"login":"robertjd","id":132343,"avatar_url":"https://avatars.githubusercontent.com/u/132343?v=3","gravatar_id":"","url":"https://api.github.com/users/robertjd","html_url":"https://github.com/robertjd","followers_url":"https://api.github.com/users/robertjd/followers","following_url":"https://api.github.com/users/robertjd/following{/other_user}","gists_url":"https://api.github.com/users/robertjd/gists{/gist_id}","starred_url":"https://api.github.com/users/robertjd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robertjd/subscriptions","organizations_url":"https://api.github.com/users/robertjd/orgs","repos_url":"https://api.github.com/users/robertjd/repos","events_url":"https://api.github.com/users/robertjd/events{/privacy}","received_events_url":"https://api.github.com/users/robertjd/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T21:33:02Z","updated_at":"2015-05-21T21:33:02Z","body":"Hi @AlmaasAre \r\n\r\nThe cookie should still work even if the API is on a different URL, but you will have to instruct the XHR object to use the `withCredentials` flag (Angular's $http object accepts this).\r\n\r\nThis has prompted me to write an example app that shows how to do this with our SDKs.  Are you using our Express SDK with Angular?\r\n\r\n"}}