{"action":"created","issue":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2020","repository_url":"https://api.github.com/repos/ParsePlatform/parse-server","labels_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2020/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2020/comments","events_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2020/events","html_url":"https://github.com/ParsePlatform/parse-server/issues/2020","id":159518963,"number":2020,"title":"Parse.User.current not working? Do i use something else?","user":{"login":"farhansyed9","id":9581815,"avatar_url":"https://avatars.githubusercontent.com/u/9581815?v=3","gravatar_id":"","url":"https://api.github.com/users/farhansyed9","html_url":"https://github.com/farhansyed9","followers_url":"https://api.github.com/users/farhansyed9/followers","following_url":"https://api.github.com/users/farhansyed9/following{/other_user}","gists_url":"https://api.github.com/users/farhansyed9/gists{/gist_id}","starred_url":"https://api.github.com/users/farhansyed9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/farhansyed9/subscriptions","organizations_url":"https://api.github.com/users/farhansyed9/orgs","repos_url":"https://api.github.com/users/farhansyed9/repos","events_url":"https://api.github.com/users/farhansyed9/events{/privacy}","received_events_url":"https://api.github.com/users/farhansyed9/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-09T22:04:02Z","updated_at":"2016-06-09T22:12:24Z","closed_at":"2016-06-09T22:12:24Z","body":"here is what im doing, the app.post works for login, but when it goes to app.get, Parse.User.current is null\r\n\r\napp.post('/login', function(req, res) {\r\n  Parse.User.logIn(req.body.username, req.body.password, {\r\n  success: function(user) {\r\n    // Do stuff after successful login.\r\n    console.log('user: ' + user);\r\n    res.redirect('/home');\r\n  },\r\n  error: function(user, error) {\r\n    // The login failed. Check error to see why.\r\n    console.log('error login');\r\n    res.redirect('/login');\r\n  }\r\n});\r\n\r\n});\r\n\r\n\r\napp.get('/home',function(req, res){\r\n\r\nif (Parse.User.current()) {\r\n      // No need to fetch the current user for querying Note objects.\r\n  var currentUser = Parse.User.current();\r\n  var sessionToken = currentUser.get('sessionToken');\r\n\r\n  console.log(sessionToken);\r\n    }\r\n});"},"comment":{"url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/comments/225042599","html_url":"https://github.com/ParsePlatform/parse-server/issues/2020#issuecomment-225042599","issue_url":"https://api.github.com/repos/ParsePlatform/parse-server/issues/2020","id":225042599,"user":{"login":"drew-gross","id":558242,"avatar_url":"https://avatars.githubusercontent.com/u/558242?v=3","gravatar_id":"","url":"https://api.github.com/users/drew-gross","html_url":"https://github.com/drew-gross","followers_url":"https://api.github.com/users/drew-gross/followers","following_url":"https://api.github.com/users/drew-gross/following{/other_user}","gists_url":"https://api.github.com/users/drew-gross/gists{/gist_id}","starred_url":"https://api.github.com/users/drew-gross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drew-gross/subscriptions","organizations_url":"https://api.github.com/users/drew-gross/orgs","repos_url":"https://api.github.com/users/drew-gross/repos","events_url":"https://api.github.com/users/drew-gross/events{/privacy}","received_events_url":"https://api.github.com/users/drew-gross/received_events","type":"User","site_admin":false},"created_at":"2016-06-09T22:12:24Z","updated_at":"2016-06-09T22:12:24Z","body":"You'll need to switch to using an explicit session token in your queries if you make to make queries in cloud code as a specific user. See the migration guide: https://github.com/ParsePlatform/Parse-Server/wiki/Compatibility-with-Hosted-Parse#Cloud-Code"}}
{"actor":{"display_login":"drew-gross"}}