{"action":"created","issue":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/821","repository_url":"https://api.github.com/repos/nuxt/nuxt.js","labels_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/821/labels{/name}","comments_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/821/comments","events_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/821/events","html_url":"https://github.com/nuxt/nuxt.js/issues/821","id":232680963,"number":821,"title":"Auth Guard issue (middleware)","user":{"login":"panorart","id":22673738,"avatar_url":"https://avatars1.githubusercontent.com/u/22673738?v=3","gravatar_id":"","url":"https://api.github.com/users/panorart","html_url":"https://github.com/panorart","followers_url":"https://api.github.com/users/panorart/followers","following_url":"https://api.github.com/users/panorart/following{/other_user}","gists_url":"https://api.github.com/users/panorart/gists{/gist_id}","starred_url":"https://api.github.com/users/panorart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/panorart/subscriptions","organizations_url":"https://api.github.com/users/panorart/orgs","repos_url":"https://api.github.com/users/panorart/repos","events_url":"https://api.github.com/users/panorart/events{/privacy}","received_events_url":"https://api.github.com/users/panorart/received_events","type":"User","site_admin":false},"labels":[{"id":469223667,"url":"https://api.github.com/repos/nuxt/nuxt.js/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true},{"id":469223669,"url":"https://api.github.com/repos/nuxt/nuxt.js/labels/question","name":"question","color":"cc317c","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-05-31T20:09:45Z","updated_at":"2017-06-05T14:55:55Z","closed_at":null,"body":"I'm using JWT and saves a token in sessionStorage at client side.\r\n\r\nI have an auth middleware which will check if the token exists in the sessionStorage and redirect if not.\r\n\r\nThe problem is, when the browser loads the app, or refresh, the middleware does not run locally at the first time, which leads to the \"not found\" error of sessionStorage. \r\n\r\neven beforeCreate and created lifecycle hooks are running in the \"server side\" so the first check point on the client side will be after those lifecycles and this leads to inefficient redirections. It will be cool if it can redirect the page with loading as less information as possible in the page.\r\n\r\nIs there a way that can elegantly handle this issue? "},"comment":{"url":"https://api.github.com/repos/nuxt/nuxt.js/issues/comments/306209042","html_url":"https://github.com/nuxt/nuxt.js/issues/821#issuecomment-306209042","issue_url":"https://api.github.com/repos/nuxt/nuxt.js/issues/821","id":306209042,"user":{"login":"motia","id":20706253,"avatar_url":"https://avatars0.githubusercontent.com/u/20706253?v=3","gravatar_id":"","url":"https://api.github.com/users/motia","html_url":"https://github.com/motia","followers_url":"https://api.github.com/users/motia/followers","following_url":"https://api.github.com/users/motia/following{/other_user}","gists_url":"https://api.github.com/users/motia/gists{/gist_id}","starred_url":"https://api.github.com/users/motia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motia/subscriptions","organizations_url":"https://api.github.com/users/motia/orgs","repos_url":"https://api.github.com/users/motia/repos","events_url":"https://api.github.com/users/motia/events{/privacy}","received_events_url":"https://api.github.com/users/motia/received_events","type":"User","site_admin":false},"created_at":"2017-06-05T14:55:55Z","updated_at":"2017-06-05T14:55:55Z","body":"Sorry @panorart , I don't have experience with AWS :("}}
{"actor":{"display_login":"motia"}}