{"action":"opened","issue":{"url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/847","labels_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/847/labels{/name}","comments_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/847/comments","events_url":"https://api.github.com/repos/DaftMonk/generator-angular-fullstack/issues/847/events","html_url":"https://github.com/DaftMonk/generator-angular-fullstack/issues/847","id":58868615,"number":847,"title":"Why Auth.isLoggedInAsync() in app.js?","user":{"login":"honkskillet","id":2345665,"avatar_url":"https://avatars.githubusercontent.com/u/2345665?v=3","gravatar_id":"","url":"https://api.github.com/users/honkskillet","html_url":"https://github.com/honkskillet","followers_url":"https://api.github.com/users/honkskillet/followers","following_url":"https://api.github.com/users/honkskillet/following{/other_user}","gists_url":"https://api.github.com/users/honkskillet/gists{/gist_id}","starred_url":"https://api.github.com/users/honkskillet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/honkskillet/subscriptions","organizations_url":"https://api.github.com/users/honkskillet/orgs","repos_url":"https://api.github.com/users/honkskillet/repos","events_url":"https://api.github.com/users/honkskillet/events{/privacy}","received_events_url":"https://api.github.com/users/honkskillet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-25T08:42:41Z","updated_at":"2015-02-25T08:42:41Z","closed_at":null,"body":"Just looking for a little clarification.  What is the point of using 'Auth.isLoggedInAsync()' inside app.js?\r\n```\r\n.run(function ($rootScope, $location, Auth) {\r\n    $rootScope.$on('$routeChangeStart', function (event, next) {\r\n      Auth.isLoggedInAsync(function(loggedIn) { ...\r\n```\r\nBy checking logged in status in an async manner, it allows a request for a route that the user may not be authenticated for to be send, incurring unneeded overhead, no?  I'm sure I'm just in need of sleep, but what is the use for check logged in status asynchronously? \r\n\r\nThanks."}}