I'm having react-native app that is using Firebase to verify user phone numbers. So far, I was testing this by the use of test phone number added to Firebase console and it was working fine. Now, I'm trying to prepare my application for release and I was trying to generated signed release and test phone verification. I did the following:
In each of these builds when firebase is trying to authenticate it's causing app to crash when request to send OTP code is made. My implementation is similar to approach described here https://heartbeat.fritz.ai/implement-firebase-phone-authentication-in-react-native-apps-237959027611
App works well with test phone number.
Error is happening within this code silently, e.g. catch block doesn't catch any error:
firebase
.auth()
.signInWithPhoneNumber(this.state.phone)
.then(confirmResult => {
this.setState({ confirmResult })
})
.catch(error => {
alert(error.message)
console.log(error)
})
Did I miss something here?
Put this line inside app/build.gradle under dependencies
implementation "androidx.browser:browser:1.2.0"
It is because its do reCAPTCHA verification and opens up browser.