I am implementing Firebase authentication in my app. I had started facing this issue since firebase package are upgrade from "@react-native-firebase/auth": "^12.4.0" to "@react-native-firebase/auth": "^12.8.0".
I have checked older question related this issue but they are too old and the answer are not solving the issue.
Strange is I am able to login sometimes and sometime not. The play store version is not at all working. It always shows this error.
Below are the library I am using: "@react-native-firebase/app": "^12.8.0", "@react-native-firebase/auth": "^12.8.0", "@react-native-firebase/messaging": "^12.8.0",
All 3(debug,release,google) SHA256 key are added in firebase app. Am in dead loop now.
async function signInWithPhoneNumber() {
console.log('Inside the Phone Number +91', registration_id);
try {
const confirmation = await auth().signInWithPhoneNumber(
'+91' + registration_id,
);
setConfirm(confirmation);
} catch (_error) {
console.log(_error);
}
}
async function confirmCode(code) {
try {
result = await confirm.confirm(code);
uid = result.user.uid;
console.log('result from confirmcode function:', uid);
} catch (_error) {
console.log('Invalid code.', _error);
}
}
Thanking in Advance.