{"action":"created","issue":{"url":"https://api.github.com/repos/baasbox/baasbox/issues/499","labels_url":"https://api.github.com/repos/baasbox/baasbox/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/baasbox/baasbox/issues/499/comments","events_url":"https://api.github.com/repos/baasbox/baasbox/issues/499/events","html_url":"https://github.com/baasbox/baasbox/issues/499","id":44961983,"number":499,"title":"Issues with Social login feature","user":{"login":"dirkam","id":6302839,"avatar_url":"https://avatars.githubusercontent.com/u/6302839?v=3","gravatar_id":"","url":"https://api.github.com/users/dirkam","html_url":"https://github.com/dirkam","followers_url":"https://api.github.com/users/dirkam/followers","following_url":"https://api.github.com/users/dirkam/following{/other_user}","gists_url":"https://api.github.com/users/dirkam/gists{/gist_id}","starred_url":"https://api.github.com/users/dirkam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dirkam/subscriptions","organizations_url":"https://api.github.com/users/dirkam/orgs","repos_url":"https://api.github.com/users/dirkam/repos","events_url":"https://api.github.com/users/dirkam/events{/privacy}","received_events_url":"https://api.github.com/users/dirkam/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/baasbox/baasbox/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/baasbox/baasbox/milestones/9","labels_url":"https://api.github.com/repos/baasbox/baasbox/milestones/9/labels","id":792762,"number":9,"title":"0.9.1","description":"","creator":{"login":"giastfader","id":2334584,"avatar_url":"https://avatars.githubusercontent.com/u/2334584?v=3","gravatar_id":"","url":"https://api.github.com/users/giastfader","html_url":"https://github.com/giastfader","followers_url":"https://api.github.com/users/giastfader/followers","following_url":"https://api.github.com/users/giastfader/following{/other_user}","gists_url":"https://api.github.com/users/giastfader/gists{/gist_id}","starred_url":"https://api.github.com/users/giastfader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giastfader/subscriptions","organizations_url":"https://api.github.com/users/giastfader/orgs","repos_url":"https://api.github.com/users/giastfader/repos","events_url":"https://api.github.com/users/giastfader/events{/privacy}","received_events_url":"https://api.github.com/users/giastfader/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":3,"state":"open","created_at":"2014-09-17T08:08:17Z","updated_at":"2015-01-02T23:31:25Z","due_on":null,"closed_at":null},"comments":7,"created_at":"2014-10-06T09:05:05Z","updated_at":"2015-01-07T18:13:08Z","closed_at":null,"body":"If a user logs in with G+ and the server is restarted (or the session token gets expired) the user has to login again but can't access any of the resources.\r\n\r\nBaasBox returns Success message for the login but if I try to access any resource I get permission error. E.g when I try to fetch the user info:\r\n\r\nclass com.baasbox.android.BaasClientException :{\"result\":\"error\",\"message\":\"User xxxxx is not authorized to access\",\"resource\":\"/me\",\"method\":\"GET\",\"request_header\":{\"X-BAASBOX-APPCODE\":[\"1234567890\"],\"Connection\":[\"Keep-Alive\"],\"X-BB-SESSION\":[“xxxxx\"],\"Accept-Encoding\":[\"gzip\"],\"User-Agent\":[\"BaasBox AndroidSDK/0.8.3a\"],\"Host\":[“xxxxx\"]},\"API_version\":\"0.9.0-snapshot-nightly\",\"http_code\":401}\r\n            at com.baasbox.android.NetworkTask.onClientError(NetworkTask.java:99)\r\n            at com.baasbox.android.NetworkTask.parseResponse(NetworkTask.java:64)\r\n            at com.baasbox.android.NetworkTask.asyncCall(NetworkTask.java:152)\r\n            at com.baasbox.android.impl.Task.execute(Task.java:189)\r\n            at com.baasbox.android.impl.Dispatcher$Worker.run(Dispatcher.java:170)\r\n\r\nTests:\r\n- Logged in with FB, all good.\r\n- Restarted the server itself where BaasBox is hosted.\r\n- Session got expired and I could log in again with FB. Everything was fine.\r\n\r\nTried with G+ login and I get the not authorized response from BaasBox.\r\nIt seems that FB works fine, only G+ login is affected. Tried it with BaasBox user and it’s ok as well.\r\n\r\nI noticed that if a BaasBox user is logged in and the server is restarted then the session token is still valid after the restart. This is great, can you make the social login to survive a server upgrade/restart, too? On mobile devices users don’t want to login every time the backend has been modified. Since it works with users created on BaasBox I hope there is a way to implement it with social login users.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/baasbox/baasbox/issues/comments/69064724","html_url":"https://github.com/baasbox/baasbox/issues/499#issuecomment-69064724","issue_url":"https://api.github.com/repos/baasbox/baasbox/issues/499","id":69064724,"user":{"login":"erayoezmue","id":7945699,"avatar_url":"https://avatars.githubusercontent.com/u/7945699?v=3","gravatar_id":"","url":"https://api.github.com/users/erayoezmue","html_url":"https://github.com/erayoezmue","followers_url":"https://api.github.com/users/erayoezmue/followers","following_url":"https://api.github.com/users/erayoezmue/following{/other_user}","gists_url":"https://api.github.com/users/erayoezmue/gists{/gist_id}","starred_url":"https://api.github.com/users/erayoezmue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erayoezmue/subscriptions","organizations_url":"https://api.github.com/users/erayoezmue/orgs","repos_url":"https://api.github.com/users/erayoezmue/repos","events_url":"https://api.github.com/users/erayoezmue/events{/privacy}","received_events_url":"https://api.github.com/users/erayoezmue/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T18:13:07Z","updated_at":"2015-01-07T18:13:07Z","body":"The Facebook login API works like a charm as long as I don't use the renaming feature. Now I renamed the user and now always get the exception that this user is not allowed to do anything. \r\n\r\n    class com.baasbox.android.BaasClientException :{\"result\":\"error\",\"message\":\"User erayozzzz is not authorized to access\",\"resource\":\"/logout\",\"method\":\"POST\",\"request_header\":{\"X-BAASBOX-APPCODE\":[\"XXX\"],\"Connection\":[\"Keep-Alive\"],\"Content-Length\":[\"0\"],\"X-BB-SESSION\":[\"XXXX\"],\"Content-Type\":[\"application/x-www-form-urlencoded\"],\"Accept-Encoding\":[\"gzip\"],\"User-Agent\":[\"BaasBox AndroidSDK/0.8.3\"],\"Host\":[\"XXX\"]},\"API_version\":\"0.9.0\",\"http_code\":401}\r\n\r\nBefore I renamed the user it worked. Then I renamed it and logged out and logged in again. Now everytime I login with this user, it is not allowed to do anything. Seems that the user loses all privileges after giving it a new name. "}}