title: getAuth().onAuthStateChanged not called, async not resolving in capacitor?
body: <p>This may be a firebase issue or a capacitor issue with promises - I'm building an iOS app with capacitor and NextJS.</p>
  <p>I'm finding async functions (at least to firebase) aren't completing even when they're successful, for example a call to 'createUserWithEmailAndPassword' from firebase succeeds (the account is created on firebase) however it doesn't resolve,</p>
  <p>onClick={() =&gt; {
  console.log(&quot;begin sign up&quot;);
  setLoading(true)
  try {
  createUserWithEmailAndPassword(getAuth(), email, password).then(data =&gt; {</p>
  <pre><code>                }).catch(e =&gt; {
                      setError(JSON.stringify(e))
                  }).finally(() =&gt; setLoading(false))
              }
              catch (e) {
                  console.log(JSON.stringify(e));
                  setLoading(false);
              }
          }}
  </code></pre>
  <p>This function works fine in a standard nextjs environment so the logic has been validated, making me think it might have to do with async functions in capicitor.</p>
  <p>I also seperately have a hook into the callback: getAuth().onAuthStateChanged and getAuth().onIdTokenChanged which are never called.</p>
  <p>Update: I used proxyman to inspect network traffic - the sign in request is suceeding with a valid payload returned however on the capacitor side it's not resolving (i.e. calling 'then' or setting a user on the firebase auth).</p>