{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13606","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13606/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13606/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13606/events","html_url":"https://github.com/angular/angular.js/issues/13606","id":123442013,"number":13606,"title":"$cookiesProvider.defaults.domain does not work","user":{"login":"TeddyHartanto","id":11240927,"avatar_url":"https://avatars.githubusercontent.com/u/11240927?v=3","gravatar_id":"","url":"https://api.github.com/users/TeddyHartanto","html_url":"https://github.com/TeddyHartanto","followers_url":"https://api.github.com/users/TeddyHartanto/followers","following_url":"https://api.github.com/users/TeddyHartanto/following{/other_user}","gists_url":"https://api.github.com/users/TeddyHartanto/gists{/gist_id}","starred_url":"https://api.github.com/users/TeddyHartanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TeddyHartanto/subscriptions","organizations_url":"https://api.github.com/users/TeddyHartanto/orgs","repos_url":"https://api.github.com/users/TeddyHartanto/repos","events_url":"https://api.github.com/users/TeddyHartanto/events{/privacy}","received_events_url":"https://api.github.com/users/TeddyHartanto/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T08:59:24Z","updated_at":"2015-12-22T09:44:22Z","closed_at":null,"body":"Hi,\r\n\r\nI am working on a multiple app angularjs project. Basically, I have an app that handles authentication, another app that handles the main part, etc.\r\n\r\nThe endpoint that handles authentication is as such: `localhost:8080/app/auth/#/login`\r\nThe endpoint of my main app is: `localhost:8080/app/#/`\r\n\r\nAfter a successful login, I would set a cookie for the token I received. Afterwards, I would redirect the page to `localhost:8080/app/#/`\r\n\r\nMy problem is after the browser is redirected to `localhost:8080/app/#/`, the token cookie that I set before wasn't there. The cookie only stays at `localhost:8080/app/auth/#/`\r\nSo I tried using` $cookiesProvider.defaults.domain =` `\"localhost:8080\"` and `\"localhost\"`. Both didn't work out.\r\n\r\n**Edit**: The above cookiesProvider configuration is set on the module that contains the service that does the authentication request to the backend. If successful, that service will set the cookie.\r\n\r\nCan somebody enlighten me? Thanks in advance!"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/166568538","html_url":"https://github.com/angular/angular.js/issues/13606#issuecomment-166568538","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13606","id":166568538,"user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars.githubusercontent.com/u/8604205?v=3","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"created_at":"2015-12-22T09:44:22Z","updated_at":"2015-12-22T09:44:22Z","body":"It's hard to say what the problem might be without a reproduction (or at least the relevant code).\r\nIf possible, please post a live demo (e.g. using CodePen, Plnkr etc)."}}