title: Firebase + Cordova: signInWithRedirect() returns null on iOS but authenticates on Android
body: <p>I followed this guide <a href="https://firebase.google.com/docs/auth/web/cordova" rel="nofollow noreferrer">https://firebase.google.com/docs/auth/web/cordova</a> to use Twitter Authentication in a Cordova app. All was working initially, but now authentication in iOS isn't working.</p>
  
  <p>It successfully redirects back to the app after using the inappbrowser plugin but the <code>signInWithRedirect()</code> returns <code>{"user": null}</code> most of the time but sometimes it works...and it does actually get the user object which is super weird. To clarify, it works on Android every time and returns the user object. </p>
  
  <pre class="lang-js prettyprint-override"><code>firebase.auth().signInWithRedirect(provider).then(function() {
      return firebase.auth().getRedirectResult()
  }).then(function (result) {
  
      var user = result;
      var token = result.credential.accessToken;
      var secret = result.credential.secret;
  
      console.log(user);
      // returns {'user': null}
  
  }).catch(function (error) {
      console.log(error)
      console.log('Error Code: ' + error.code);
      console.log('Error Message: ' + error.message);
      // error.code returns undefined
  });
  </code></pre>
  
  <p><strong>Versions:</strong></p>
  
  <p>iOS: 12.1</p>
  
  <p>Firebase: 5.8.4</p>
  
  <p>Cordova: 8.1.2</p>