Wednesday, October 28, 2026
HomeiOS Developmentios - getAuth().onAuthStateChanged not referred to as, async not resolving in capacitor?

ios – getAuth().onAuthStateChanged not referred to as, async not resolving in capacitor?

[ad_1]

This can be a firebase problem or a capacitor problem with guarantees – I am constructing an iOS app with capacitor and NextJS.

I am discovering async capabilities (not less than to firebase) aren’t finishing even after they’re profitable, for instance a name to ‘createUserWithEmailAndPassword’ from firebase succeeds (the account is created on firebase) nonetheless it would not resolve,

onClick={() => {
console.log(“start enroll”);
setLoading(true)
strive {
createUserWithEmailAndPassword(getAuth(), e-mail, password).then(information => {

                }).catch(e => {
                    setError(JSON.stringify(e))
                }).lastly(() => setLoading(false))
            }
            catch (e) {
                console.log(JSON.stringify(e));
                setLoading(false);
            }
        }}

This perform works effective in a typical nextjs surroundings so the logic has been validated, making me suppose it might need to do with async capabilities in capicitor.

I additionally seperately have a hook into the callback: getAuth().onAuthStateChanged and getAuth().onIdTokenChanged that are by no means referred to as.

[ad_2]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments