{"action":"opened","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/issues/401","repository_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-Android","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/issues/401/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-Android/issues/401/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-Android/issues/401","id":134734496,"number":401,"title":"Failed signup attempt with anonymous ParseUser leaves it in inconsistent state","user":{"login":"yuzeh","id":351023,"avatar_url":"https://avatars.githubusercontent.com/u/351023?v=3","gravatar_id":"","url":"https://api.github.com/users/yuzeh","html_url":"https://github.com/yuzeh","followers_url":"https://api.github.com/users/yuzeh/followers","following_url":"https://api.github.com/users/yuzeh/following{/other_user}","gists_url":"https://api.github.com/users/yuzeh/gists{/gist_id}","starred_url":"https://api.github.com/users/yuzeh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yuzeh/subscriptions","organizations_url":"https://api.github.com/users/yuzeh/orgs","repos_url":"https://api.github.com/users/yuzeh/repos","events_url":"https://api.github.com/users/yuzeh/events{/privacy}","received_events_url":"https://api.github.com/users/yuzeh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-02-19T00:04:38Z","updated_at":"2016-02-19T00:04:38Z","closed_at":null,"body":"Hi,\r\n\r\nWhenever a signup fails with an anonymous ParseUser, I've noticed a couple of things:\r\n* The app will still have a session token for that user which has been invalidated by the server (any CloudFunction call will error with an \"invalid session token\" message).\r\n* The user is not considered anonymous anymore! Calling `ParseAnonymousUtils.isLinked(ParseUser.current())` returns false.\r\n\r\nReproduction steps:\r\n* Enable anonymous users.\r\n* Save the current (anonymous) user to the backend. (Not sure if this is important, but this is what our app will do).\r\n* Trigger a failed signup attempt. I've only tried signing up with a username that already exists.\r\n* Read the value of `ParseAnonymousUtils.isLinked(ParseUser.current())`.\r\n\r\nFrom my understanding, the last value should be true, but is actually false.\r\n\r\nThese things are troubling because we are using `ParseAnonymousUtils.isLinked(ParseUser.current())` to determine if the user is currently logged in (user is logged in iff that returns false).\r\n\r\nTwo questions:\r\n* Is `!ParseAnonymousUtils.isLinked(ParseUser.current())` the right way to determine if a previously anonymous user is logged in?\r\n* If not, what is the right way? If so, is the current behavior I'm seeing in fact a bug?"}}