From 00797666eeb1af8379fc8da8ca3d8baa85a62b5d Mon Sep 17 00:00:00 2001 From: Alex Kotliarskyi Date: Fri, 13 Nov 2015 13:53:11 -0800 Subject: [PATCH] Make FacebookUtils work with React Native --- src/ParseUser.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ParseUser.js b/src/ParseUser.js index 34268e9e0..25326a4af 100644 --- a/src/ParseUser.js +++ b/src/ParseUser.js @@ -694,10 +694,11 @@ export default class ParseUser extends ParseObject { static _registerAuthenticationProvider(provider) { authProviders[provider.getAuthType()] = provider; // Synchronize the current user with the auth provider. - var current = ParseUser.current(); - if (current) { - current._synchronizeAuthData(provider.getAuthType()); - } + ParseUser.currentAsync().then((current) => { + if (current) { + current._synchronizeAuthData(provider.getAuthType()); + } + }); } static _logInWith(provider, options) {