I try run auth().verifyPhoneNumber(phoneNumber)
like documentation examples (use on and then syntax
) and show this message in a console. Same result in rnFirabse 10.3.0 and 10.2.0.
All other Auth methods work fine in js engine and Hermes
TypeError: this._auth.emitter.once is not a function.
(In 'this._auth.emitter.once(this._internalEvents[type], this["_" + type + "Handler"].bind(this))',
'this._auth.emitter.once' is undefined)
my code
async function signInWithPhoneNumber(phoneNumber) {
const confirmationw = auth()
.verifyPhoneNumber(phoneNumber)
.on('state_changed', (phoneAuthSnapshot) => {
console.log(phoneAuthSnapshot)
})
console.log(confirmationw)
}
Env
iOS 14
Mac OS Big Sur
React-Native 0.64.0-rc.1
React 17.0.1
react-native-firebase/app 10.3.0
react-native-firebase/auth 10.3.1
react-native-firebase/firestore 10.3.1
Ah! This was solved. It was a forward port needed for react-native 0.64. I did that and released it: #5042 – you need v11.1.2 or higher of react-native firebase