Closed
Description
The following code will work on Parse.com with JS SDK 1.6.14, but not in a parse-server unit test:
it('respects useMasterKey when linking with Facebook', (done) => {
var user = new Parse.User();
user.setUsername('username');
user.setPassword('password');
user.set('attribute', 'value1');
user.signUp().then((user) => {
Parse.User.logOut();
var authData = {
id: "8675309",
access_token: "jenny",
expiration_date: new Date().toJSON()
};
return Parse.FacebookUtils.link(user, authData);
}).then((user) => {
done();
}, (error) => {
fail(error.message);
done();
});
});
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:
return Parse.FacebookUtils.link(user, authData, {
useMasterKey: true
});
Just wanted to discuss here before creating an issue in the JS SDK and probably a PR.
Metadata
Metadata
Assignees
Labels
No labels