-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Parse.FacebookUtils.Link from Cloud Code fails yet works on Parse.com #1464
Comments
You can easily test that unit test by calling
with appId, jsKey and masterKey real keys to parse.com |
Wouldn't it only allow them to link one account they one to another account they either own or have write access to? |
OK, so running that specific test against Parse.com gives an error message: The problem I'm trying to debug is where I call
I'll keep digging to see if I can provide any more details. The error code is: Here's how I'm testing:
|
The error code is thrown in Parse-SDK-JS ParseUser.linkWith as the authData does not contain a session token so the user cannot save.
authData is coming from the user.
Perhaps parse-server lacks the full auth data on request.user? I could not see any significant difference in request.user with parse-server by logging Parse.com parse-server Adding logging to the linkWith function above, the authData at this point on parse-server is : |
I can think of 3 solutions so far:
I could live with 3. but am worried what else is not going to work if we do not fix 1. E.g. Consider users with a limited ACL with no public read, only self-read/write. The following Cloud Code fetches the user making the call:
Call with:
On Parse.com the response is: With a local parse-server pointing to the same database: |
Possibly related: #1090. Will investigate further. |
I've solved this as suggested in the other ticket. |
The following code will work on Parse.com with JS SDK 1.6.14, but not in a parse-server unit test:
I'm not sure that this should work on Parse.com because it would enable one user to link another user's account.
I would expect the following code to work correctly in both cases but this will require a change to Parse-SDK-JS:
Just wanted to discuss here before creating an issue in the JS SDK and probably a PR.
The text was updated successfully, but these errors were encountered: