{"action":"opened","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/609","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/609/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/609/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-iOS-OSX/issues/609/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-iOS-OSX/issues/609","id":119375853,"number":609,"title":"Parse OS X Client and Cloud Code Disagree About User Being Logged In","user":{"login":"iosdev-republicofapps","id":1666680,"avatar_url":"https://avatars.githubusercontent.com/u/1666680?v=3","gravatar_id":"","url":"https://api.github.com/users/iosdev-republicofapps","html_url":"https://github.com/iosdev-republicofapps","followers_url":"https://api.github.com/users/iosdev-republicofapps/followers","following_url":"https://api.github.com/users/iosdev-republicofapps/following{/other_user}","gists_url":"https://api.github.com/users/iosdev-republicofapps/gists{/gist_id}","starred_url":"https://api.github.com/users/iosdev-republicofapps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iosdev-republicofapps/subscriptions","organizations_url":"https://api.github.com/users/iosdev-republicofapps/orgs","repos_url":"https://api.github.com/users/iosdev-republicofapps/repos","events_url":"https://api.github.com/users/iosdev-republicofapps/events{/privacy}","received_events_url":"https://api.github.com/users/iosdev-republicofapps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-29T18:31:12Z","updated_at":"2015-11-29T18:31:12Z","closed_at":null,"body":"Hi,\r\n\r\nI have code that checks the user locally in my OS X client before making a cloud code call and:\r\n```\r\n// Returns non-nil\r\n[PFUser currentUser]\r\n\r\n// Returns YES\r\n[PFUser currentUser].isAuthenticated\r\n```\r\nSo from the client code's perspective, the user is clearly known, authenticated and logged in.\r\n\r\nHowever, when I call the `rateTheme` method from the client code, the cloud code on the server claims the request has no user:\r\n```\r\nParse.Cloud.define(\"rateTheme\", function(request, response) {\r\n  var user = request.user;\r\n  console.log(\"rateTheme: user is '\" + user + \"'\");\r\n  if (!user) {\r\n    // This gets executed, because the cloud code thinks the user is not authenticated.\r\n    // Returns error 141\r\n    response.error(\"You must be signed in to rate a theme.\");\r\n  }\r\n else\r\n{\r\n  // This does NOT get executed\r\n}\r\n```\r\nSo why does the server cloud code think the user is not logged in when the client code does think it is logged in?  This is 100% reproducible.  I haven't used my app for some time, so is it possible that the client user session \"expired\" somehow and just didn't realize it?\r\n\r\nFrom lldb:\r\n```\r\n(bool) $4 = true\r\n(lldb) po [PFUser currentUser]\r\n<PFUser: 0x600000103720, objectId: 1u4IWxELXr, localId: (null)> {\r\n    email = \"joeltest54@test.com\";\r\n    myThemes =     (\r\n        r6CAi8vPxj,\r\n        Nq86u49Qcv,\r\n        uCBFZRejA5,\r\n        D7uRmfD77b,\r\n        Vce5TTXI7M\r\n    );\r\n    username = joeltest54;\r\n}\r\n\r\n(lldb) p [(PFUser *)[PFUser currentUser] isAuthenticated] == YES\r\n(bool) $6 = true\r\n```\r\nI also did a clean build and re-ran and then this happened, in Xcode debug build.  Any chance something odd is happening there?\r\n\r\nThis seems like a Parse bug.  I have no way of verifying if the user is logged in locally if I can't trust the client and server to agree if the user is logged in.\r\n\r\nAlso, trying to save the user (by adding a theme to the user's list of themes, stored on the user) returns an error, error\r\n```\r\nError 206: Parse::UserCannotBeAlteredWithoutSessionError\r\n```\r\n\r\nAny ideas?\r\n\r\nThanks!"}}