{"action":"created","issue":{"url":"https://api.github.com/repos/sahat/satellizer/issues/1058","repository_url":"https://api.github.com/repos/sahat/satellizer","labels_url":"https://api.github.com/repos/sahat/satellizer/issues/1058/labels{/name}","comments_url":"https://api.github.com/repos/sahat/satellizer/issues/1058/comments","events_url":"https://api.github.com/repos/sahat/satellizer/issues/1058/events","html_url":"https://github.com/sahat/satellizer/issues/1058","id":207621305,"number":1058,"title":"Satellizer with ui-router","user":{"login":"aljazkosir","id":1367334,"avatar_url":"https://avatars3.githubusercontent.com/u/1367334?v=3","gravatar_id":"","url":"https://api.github.com/users/aljazkosir","html_url":"https://github.com/aljazkosir","followers_url":"https://api.github.com/users/aljazkosir/followers","following_url":"https://api.github.com/users/aljazkosir/following{/other_user}","gists_url":"https://api.github.com/users/aljazkosir/gists{/gist_id}","starred_url":"https://api.github.com/users/aljazkosir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljazkosir/subscriptions","organizations_url":"https://api.github.com/users/aljazkosir/orgs","repos_url":"https://api.github.com/users/aljazkosir/repos","events_url":"https://api.github.com/users/aljazkosir/events{/privacy}","received_events_url":"https://api.github.com/users/aljazkosir/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-14T20:03:19Z","updated_at":"2017-03-27T11:22:17Z","closed_at":null,"body":"When using ui-router `$auth.authenticate(provider)` is returning invalid response: `{ view1: true }`.\r\n\r\nIt doesn't always return invalid response. First time I login it's working, but then if I  `$auth.logout` and try to authenticate again, I'm getting this weird response. Is there some trick I should do if I'm using ui-router? I've been searching here on issues for similar problems but didn't find anything that would help me with my problem.\r\n\r\nSome pieces of code:\r\n\r\n```\r\nangular.module('myApp.view1', ['satellizer', 'ui.router'])\r\n.config(function($stateProvider, $urlRouterProvider, $authProvider) {\r\n        $urlRouterProvider.otherwise('/view1');\r\n        $authProvider.google({\r\n            clientId: 'xxx.apps.googleusercontent.com',\r\n            responseType: 'token',\r\n            scope: ['openid', 'profile', 'email'],\r\n        });\r\n\r\n        $stateProvider\r\n            .state('view1', {\r\n                url: '/view1',\r\n                templateUrl: 'view1/view1.html',\r\n                controller: 'View1Ctrl'\r\n            })\r\n})\r\n.controller('View1Ctrl', function($scope, $auth) {\r\n  $scope.authenticate = function(provider) {\r\n    $auth.authenticate(provider)\r\n    .then(function(response){\r\n      console.log(response);  //this will give me {view1: true}\r\n    })\r\n  };\r\n});\r\n```\r\nThanks for helping me out!"},"comment":{"url":"https://api.github.com/repos/sahat/satellizer/issues/comments/289425313","html_url":"https://github.com/sahat/satellizer/issues/1058#issuecomment-289425313","issue_url":"https://api.github.com/repos/sahat/satellizer/issues/1058","id":289425313,"user":{"login":"aljazkosir","id":1367334,"avatar_url":"https://avatars3.githubusercontent.com/u/1367334?v=3","gravatar_id":"","url":"https://api.github.com/users/aljazkosir","html_url":"https://github.com/aljazkosir","followers_url":"https://api.github.com/users/aljazkosir/followers","following_url":"https://api.github.com/users/aljazkosir/following{/other_user}","gists_url":"https://api.github.com/users/aljazkosir/gists{/gist_id}","starred_url":"https://api.github.com/users/aljazkosir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljazkosir/subscriptions","organizations_url":"https://api.github.com/users/aljazkosir/orgs","repos_url":"https://api.github.com/users/aljazkosir/repos","events_url":"https://api.github.com/users/aljazkosir/events{/privacy}","received_events_url":"https://api.github.com/users/aljazkosir/received_events","type":"User","site_admin":false},"created_at":"2017-03-27T11:22:17Z","updated_at":"2017-03-27T11:22:17Z","body":"Disabling html5 and hash prefix:\r\n\r\n```\r\n$locationProvider.html5Mode(false);\r\n$locationProvider.hashPrefix('');\r\n```\r\nI also added root route:\r\n```\r\n\r\n            .state('root', {\r\n                url: '/state={state}&access_token={access_token}',\r\n                template: ''\r\n            })\r\n\r\n```\r\nThis solves problem for me"}}
{"actor":{"display_login":"aljazkosir"}}