I'm trying to login a User with User.logIn, because I want to test all my cloud code functions with Mocha and expect.js.
I know I can use the masterkey, but I want to test if my errors are handled correctly when I'm logged in with a wrong user (basically I want to test what happens when the ACL blocks the request).
I've tried logging in with cURL and that works, but then I can't become the user because Parse blocks that through It is not memory-safe to become a user in a server environment.
Is this simply not possible or am I overlooking something?
It turns out I was overlooking something.
In the changelogs of the JS SDK at V.1.5.0 you can see that Parse added the error message described above. You can bypass that by using Parse.User.enableUnsafeCurrentUser();.
You can also provide the session token in the function options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With