{"action":"created","issue":{"url":"https://api.github.com/repos/NerdCats/WebCat/issues/105","repository_url":"https://api.github.com/repos/NerdCats/WebCat","labels_url":"https://api.github.com/repos/NerdCats/WebCat/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/NerdCats/WebCat/issues/105/comments","events_url":"https://api.github.com/repos/NerdCats/WebCat/issues/105/events","html_url":"https://github.com/NerdCats/WebCat/issues/105","id":166770187,"number":105,"title":"Updating logged in state when user tries to log in from different browser/system","user":{"login":"tonmoy71","id":4387583,"avatar_url":"https://avatars.githubusercontent.com/u/4387583?v=3","gravatar_id":"","url":"https://api.github.com/users/tonmoy71","html_url":"https://github.com/tonmoy71","followers_url":"https://api.github.com/users/tonmoy71/followers","following_url":"https://api.github.com/users/tonmoy71/following{/other_user}","gists_url":"https://api.github.com/users/tonmoy71/gists{/gist_id}","starred_url":"https://api.github.com/users/tonmoy71/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tonmoy71/subscriptions","organizations_url":"https://api.github.com/users/tonmoy71/orgs","repos_url":"https://api.github.com/users/tonmoy71/repos","events_url":"https://api.github.com/users/tonmoy71/events{/privacy}","received_events_url":"https://api.github.com/users/tonmoy71/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/NerdCats/WebCat/labels/bug","name":"bug","color":"ee0701"}],"state":"open","locked":false,"assignee":{"login":"thehoneymad","id":2936645,"avatar_url":"https://avatars.githubusercontent.com/u/2936645?v=3","gravatar_id":"","url":"https://api.github.com/users/thehoneymad","html_url":"https://github.com/thehoneymad","followers_url":"https://api.github.com/users/thehoneymad/followers","following_url":"https://api.github.com/users/thehoneymad/following{/other_user}","gists_url":"https://api.github.com/users/thehoneymad/gists{/gist_id}","starred_url":"https://api.github.com/users/thehoneymad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehoneymad/subscriptions","organizations_url":"https://api.github.com/users/thehoneymad/orgs","repos_url":"https://api.github.com/users/thehoneymad/repos","events_url":"https://api.github.com/users/thehoneymad/events{/privacy}","received_events_url":"https://api.github.com/users/thehoneymad/received_events","type":"User","site_admin":false},"assignees":[{"login":"thehoneymad","id":2936645,"avatar_url":"https://avatars.githubusercontent.com/u/2936645?v=3","gravatar_id":"","url":"https://api.github.com/users/thehoneymad","html_url":"https://github.com/thehoneymad","followers_url":"https://api.github.com/users/thehoneymad/followers","following_url":"https://api.github.com/users/thehoneymad/following{/other_user}","gists_url":"https://api.github.com/users/thehoneymad/gists{/gist_id}","starred_url":"https://api.github.com/users/thehoneymad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehoneymad/subscriptions","organizations_url":"https://api.github.com/users/thehoneymad/orgs","repos_url":"https://api.github.com/users/thehoneymad/repos","events_url":"https://api.github.com/users/thehoneymad/events{/privacy}","received_events_url":"https://api.github.com/users/thehoneymad/received_events","type":"User","site_admin":false},{"login":"tareq89","id":4245521,"avatar_url":"https://avatars.githubusercontent.com/u/4245521?v=3","gravatar_id":"","url":"https://api.github.com/users/tareq89","html_url":"https://github.com/tareq89","followers_url":"https://api.github.com/users/tareq89/followers","following_url":"https://api.github.com/users/tareq89/following{/other_user}","gists_url":"https://api.github.com/users/tareq89/gists{/gist_id}","starred_url":"https://api.github.com/users/tareq89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tareq89/subscriptions","organizations_url":"https://api.github.com/users/tareq89/orgs","repos_url":"https://api.github.com/users/tareq89/repos","events_url":"https://api.github.com/users/tareq89/events{/privacy}","received_events_url":"https://api.github.com/users/tareq89/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2016-07-21T09:00:57Z","updated_at":"2016-07-21T11:24:13Z","closed_at":null,"body":"### Background\r\nIn Facebook and similar websites, when a user is logged in several tabs and he/she logs out from one tab, all other tabs get notified that the user has been logged out and prompts a login dialog.\r\n\r\nIn taskcat, whether a user is logged in or not is understood by json token. Say user X is logged in in pc1. Now if he login from another pc2, a new json token will be retrieved on behalf of him and the token saved in pc1 will be expired. So all the authorized calls from pc1 will get a 401 error.\r\n\r\nThe json tokens expired automatically after a certain time, in that case too, the token saved in his browser's local storage will not be applicable in the authorized api call.\r\n\r\n### Observed Problem\r\nIn the above-mentioned scenario, WebCat does not let the user log in and does not show any alert/prompt to log in again. It shows the following error as the access token gets invalid and the user becomes unauthorized.\r\n\r\nAlso, if a user manually logout and log in again, the api calls keep using the old saved token. If a manual browser refresh triggered, only then the api calls retrieved the latest token from the browser and are able to call the authorized api.\r\n\r\n![webcat-bug](https://cloud.githubusercontent.com/assets/4387583/17016954/3aaccd52-4f53-11e6-8a47-3d9ba2e4c895.PNG)\r\n\r\nProblem found in http://gofetch.cloudapp.net:8000/#/home\r\n"},"comment":{"url":"https://api.github.com/repos/NerdCats/WebCat/issues/comments/234226685","html_url":"https://github.com/NerdCats/WebCat/issues/105#issuecomment-234226685","issue_url":"https://api.github.com/repos/NerdCats/WebCat/issues/105","id":234226685,"user":{"login":"thehoneymad","id":2936645,"avatar_url":"https://avatars.githubusercontent.com/u/2936645?v=3","gravatar_id":"","url":"https://api.github.com/users/thehoneymad","html_url":"https://github.com/thehoneymad","followers_url":"https://api.github.com/users/thehoneymad/followers","following_url":"https://api.github.com/users/thehoneymad/following{/other_user}","gists_url":"https://api.github.com/users/thehoneymad/gists{/gist_id}","starred_url":"https://api.github.com/users/thehoneymad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thehoneymad/subscriptions","organizations_url":"https://api.github.com/users/thehoneymad/orgs","repos_url":"https://api.github.com/users/thehoneymad/repos","events_url":"https://api.github.com/users/thehoneymad/events{/privacy}","received_events_url":"https://api.github.com/users/thehoneymad/received_events","type":"User","site_admin":false},"created_at":"2016-07-21T11:24:13Z","updated_at":"2016-07-21T11:24:13Z","body":"Okay, now I understand. Yes, thats an horizontal session scaling issue. Hold on"}}
{"actor":{"display_login":"thehoneymad"}}