title: React Native: Implementing Facebook OAuth with Redux Saga Firebase
body: <p>I'm trying to implement Facebook OAuth (react-native-fbsdk) in my React Native application. I can get the Access Token. With the access token, I can then retrieve the credentials using <code>const credential = yield facebookAuth.credential(data.accessToken);</code> Then when I try to create a user, I get an error (see below)</p>
  
  <p><strong>The Credentials Object:</strong></p>
  
  <pre><code>{
  oauthIdToken: "MY_ID_TOKEN"
  providerId: "facebook.com"
  signInMethod: "facebook.com"
  }
  </code></pre>
  
  <p><strong>The Issue:</strong></p>
  
  <p>The last step that I want to do that I can't seem to figure out is to create a user in Firebase using the credentials in <code>const user = yield call(reduxSagaFirebase.auth.signInAndRetrieveDataWithCredential, credential);</code></p>
  
  <p>When I try and sign in with the credential, I get the following error: <code>Invalid IdP response/credential http://localhost?id_token="MY_TOKEN_HERE</code></p>
  
  <p><strong>Login With Facebook Saga</strong></p>
  
  <pre><code>// Redux Saga: Login With Facebook
  function* loginWithFacebookSaga() {
    try {
      // Login To Facebook With Read Permissions
      console.log('Logging in with Facebook');
      yield LoginManager.logInWithPermissions([
        'public_profile',
        'email',
        'user_friends',
      ]);
  
      // Check If Cancelled
      // if (!result.isCancelled) {
        const data = yield AccessToken.getCurrentAccessToken();
        // yield alert(JSON.stringify(data.accessToken));
      // }
  
      // Create Firebase Auth Account With Facebook Access Token
      const credential = yield facebookAuth.credential(data.accessToken);
      // alert(JSON.stringify(credential));
  
      // Login (ISSUE HERE)
      const user = yield call(reduxSagaFirebase.auth.signInAndRetrieveDataWithCredential, credential);
    }
    catch (error) {
      // Firebase: Login Error
      alert(error);
      yield put(loginWithFacebookError(error));
    }
  };
  </code></pre>