I'm using react-native-firebase 5.0 Firebase phoneAuth is working fine when in development build but when i signed in the apk, the firebase.auth().signInWithPhoneNumber(phoneNumber) always runs the catch method.
But it is working fine for the testing phone number
Here the code for this module.
export const signInWithPhone = (phoneNumber) => {
return (dispatch) => {
firebase.auth()
.signInWithPhoneNumber(phoneNumber)
.then((confirmResult) => {
dispatch({
type: 'SIGN_IN_WITH_PHONE',
payload: confirmResult,
phoneNumber
})
})
.catch((error) => {
dispatch({
type: 'INVALID_PHONE_NUMBER',
})
})
}
}
here is the error message on the log act
here is the screen. +92 is added in the phone number when the user presses the submit button.