{"action":"opened","issue":{"url":"https://api.github.com/repos/driftyco/ng-cordova/issues/544","labels_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/544/labels{/name}","comments_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/544/comments","events_url":"https://api.github.com/repos/driftyco/ng-cordova/issues/544/events","html_url":"https://github.com/driftyco/ng-cordova/issues/544","id":53431085,"number":544,"title":"[Oauth] the 'exit' event always trigger before $http request return","user":{"login":"Enkows","id":1641516,"avatar_url":"https://avatars.githubusercontent.com/u/1641516?v=3","gravatar_id":"","url":"https://api.github.com/users/Enkows","html_url":"https://github.com/Enkows","followers_url":"https://api.github.com/users/Enkows/followers","following_url":"https://api.github.com/users/Enkows/following{/other_user}","gists_url":"https://api.github.com/users/Enkows/gists{/gist_id}","starred_url":"https://api.github.com/users/Enkows/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Enkows/subscriptions","organizations_url":"https://api.github.com/users/Enkows/orgs","repos_url":"https://api.github.com/users/Enkows/repos","events_url":"https://api.github.com/users/Enkows/events{/privacy}","received_events_url":"https://api.github.com/users/Enkows/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-05T19:10:38Z","updated_at":"2015-01-05T19:10:38Z","closed_at":null,"body":"https://github.com/driftyco/ng-cordova/commit/4d93e126fd13a3116f16a4fd7687b9f7d32302b5\r\n\r\nMaybe this works:\r\n```\r\n$http(...)\r\n.success(function (data) {\r\n  deferred.resolve(data);\r\n})\r\n.error(function (data, status) {\r\n  deferred.reject(\"Problem authenticating\");\r\n})\r\n.finally(function(){\r\n  browserRef.close();\r\n});\r\n```"}}