{"action":"created","issue":{"url":"https://api.github.com/repos/youppers/app/issues/18","labels_url":"https://api.github.com/repos/youppers/app/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/youppers/app/issues/18/comments","events_url":"https://api.github.com/repos/youppers/app/issues/18/events","html_url":"https://github.com/youppers/app/issues/18","id":67416155,"number":18,"title":"Authentication","user":{"login":"sergiostrampelli","id":9050752,"avatar_url":"https://avatars.githubusercontent.com/u/9050752?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiostrampelli","html_url":"https://github.com/sergiostrampelli","followers_url":"https://api.github.com/users/sergiostrampelli/followers","following_url":"https://api.github.com/users/sergiostrampelli/following{/other_user}","gists_url":"https://api.github.com/users/sergiostrampelli/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiostrampelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiostrampelli/subscriptions","organizations_url":"https://api.github.com/users/sergiostrampelli/orgs","repos_url":"https://api.github.com/users/sergiostrampelli/repos","events_url":"https://api.github.com/users/sergiostrampelli/events{/privacy}","received_events_url":"https://api.github.com/users/sergiostrampelli/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/youppers/app/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/youppers/app/labels/URGENT","name":"URGENT","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-04-09T17:52:20Z","updated_at":"2015-04-14T14:07:21Z","closed_at":null,"body":"The TOKEN should ONLY be ONE throughout the usage of the APP.\r\nNEVER HAVE 2 tokens. It should ALWAYS be the same one.\r\n\r\nThe App, after authentication, must use the new **access_token**, not the old one.\r\nSo, the old one should be discarded.\r\n\r\nWhich library OpenOut are you using?\r\n\r\nCorrectly, the App is using the new token only when calling Consultant.list. BUT it shouldn't be only in this event.\r\n\r\nThe token MUST be only one!\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/youppers/app/issues/comments/92865042","html_url":"https://github.com/youppers/app/issues/18#issuecomment-92865042","issue_url":"https://api.github.com/repos/youppers/app/issues/18","id":92865042,"user":{"login":"sergiostrampelli","id":9050752,"avatar_url":"https://avatars.githubusercontent.com/u/9050752?v=3","gravatar_id":"","url":"https://api.github.com/users/sergiostrampelli","html_url":"https://github.com/sergiostrampelli","followers_url":"https://api.github.com/users/sergiostrampelli/followers","following_url":"https://api.github.com/users/sergiostrampelli/following{/other_user}","gists_url":"https://api.github.com/users/sergiostrampelli/gists{/gist_id}","starred_url":"https://api.github.com/users/sergiostrampelli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergiostrampelli/subscriptions","organizations_url":"https://api.github.com/users/sergiostrampelli/orgs","repos_url":"https://api.github.com/users/sergiostrampelli/repos","events_url":"https://api.github.com/users/sergiostrampelli/events{/privacy}","received_events_url":"https://api.github.com/users/sergiostrampelli/received_events","type":"User","site_admin":false},"created_at":"2015-04-14T14:07:21Z","updated_at":"2015-04-14T14:07:21Z","body":"This is how we produce the erroneous behavior:\r\n \r\nOpen App\r\nLogin\r\nClick on \"Concludi sessione\" (bottom right pushbotton)\r\nClick on \"Concludi e continua ...\"\r\n\r\nThis is what we see server side: two consecutives requests with different tokens.\r\n1) Consultant.list uses the token with grant password (issued after login)\r\n2) Session.read uses the token with grant client (issued at app startup)\r\nAll json-rpc requests MUST use the token that uses Consultant.list\r\nThe token used by Session.read (and all other requests) MUST be overwritten when a new token was issued by the authentication server.\r\nIf you dont' use the right token, all the logic is wrong.\r\nThankyou.\r\n\r\n```\r\n[2015-04-14 08:52:59] app.INFO: JSON-RPC Client IP: 82.53.171.128 [] []\r\n[2015-04-14 08:52:59] app.INFO: JSON-RPC Query String: access_token=NmQxOTEyMjgzZmQ2MjVjMjY1Yjg4NTM1YTFkZGU2MDQ2ZDUyYjE4ODcwNGUzMDM1OWMxODUxMjMxYmM1Y2MwZA [] []\r\n[2015-04-14 08:52:59] app.INFO: JSON-RPC Request: {\"id\":\"33\",\"jsonrpc\":\"2.0\",\"method\":\"Consultant.list\",\"params\":{\"sessionId\":\"6dd436a3-e2ad-11e4-b4aa-0cc47a127a14\"}} [] []\r\n[2015-04-14 08:52:59] app.ERROR: Store not selected for session '2015-04-14T08:52:02-05:00' [] []\r\n[2015-04-14 08:52:59] app.INFO: JSON-RPC Response: {\"jsonrpc\":\"2.0\",\"error\":{\"code\":-32603,\"message\":\"Internal error\",\"data\":\"Store must be set in the Session '2015-04-14T08:52:02-05:00'\"},\"id\":\"33\"} [] []\r\n```\r\n```\r\n[2015-04-14 08:53:00] app.INFO: JSON-RPC Client IP: 82.53.171.128 [] []\r\n[2015-04-14 08:53:00] app.INFO: JSON-RPC Query String: access_token=MThhOTcwZWEyY2YxYTRlYWU3ZGJjOTk1MWI5Y2FhOGYxNmY0ZjEwNmY0NGQwNDFlNzIxNDAyZTUxM2I2YmE1Nw [] []\r\n[2015-04-14 08:53:00] app.INFO: JSON-RPC Request: {\"id\":\"33\",\"jsonrpc\":\"2.0\",\"method\":\"Session.read\",\"params\":{\"sessionId\":\"6dd436a3-e2ad-11e4-b4aa-0cc47a127a14\"}} [] []\r\n[2015-04-14 08:53:00] app.INFO: JSON-RPC Response: {\"jsonrpc\":\"2.0\",\"result\":{\"id\":\"6dd436a3-e2ad-11e4-b4aa-0cc47a127a14\",\"removed\":false,\"created_at\":\"2015-04-14T08:52:02-0500\"},\"id\":\"33\"} [] []\r\n```"}}