Without ParseReact, I can call Parse.FacebookUtils.logIn using only a promise, not a callback, like so:
Parse.FacebookUtils.logIn(authData).then(function (user) {
// do something with user
});
With ParseReact, user is always null, i.e., this promise doesn't resolve to anything. All of the functions called as part of the FacebookUtils.logIn method (Parse.User._logInWith, Parse.User._linkWith, etc.) do the right thing here and bubble up the user object via promises: at the bottom level, this is handled inside Parse.Promise._thenRunCallbacks, which ensures that the same results value is applied to a promise resolution as is sent to a success callback.
This whole flow is broken inside ParsePatches.jshere:
Hello,
Without ParseReact, I can call Parse.FacebookUtils.logIn using only a promise, not a callback, like so:
With ParseReact,
user
is always null, i.e., this promise doesn't resolve to anything. All of the functions called as part of theFacebookUtils.logIn
method (Parse.User._logInWith
,Parse.User._linkWith
, etc.) do the right thing here and bubble up theuser
object via promises: at the bottom level, this is handled insideParse.Promise._thenRunCallbacks
, which ensures that the sameresults
value is applied to a promise resolution as is sent to a success callback.This whole flow is broken inside
ParsePatches.js
here:since this function accepts no argument and returns nothing, breaking the promise chain. Suggested fix:
Yes, it's still possible to do this using callbacks, but I prefer to use promises.
(The other, similar methods in
ParsePatches.js
should probably be updated too.)Thanks.