-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Undefined Parse.User.current() for Cloud functions #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
In a Node environment, it's not safe to use Parse.User.current, or become methods. You can pass a sessionToken to queries or saves to perform an operation as a user. i.e.
You can access the user making the request in the |
I understand that, but my problem is that I have a lot of functions that relay on current user, and it works on the hosted version.... Is the At least, this should be on the README.md under "Not supported". |
No, any global state would be shared between requests in Node.js, which wasn't the case on parse.com. You will have to update your Cloud Code. Good point about the readme, though, I will update it. |
Hi,
Parse.User.current()
doesn't get setup for Cloud functions.I had tired to put
Parse.User.become(sessionToken)
onAuth.js
getAuthForSessionToken
but it throw a exception:[Error: It is not memory-safe to become a user in a server environment]
The text was updated successfully, but these errors were encountered: