We are migrating from Firebase Web SDK to react native Firebase. The phone auth was working well with the Web SDK, however after migrating to react native Firebase we are facing this frustrating issue.
Here is the error message :
Error: [auth/missing-client-identifier] This request is missing a valid app identifier, meaning that Play Integrity checks and reCAPTCHA checks were unsuccessful. Please try again, or check the logcat for more details
Point of error :
auth().signInWithPhoneNumber(num).then((item) => {
setConfirmation(item);
});
We are using expo (bare workflow) and this issue is occurring while debugging in the development build as well as in the preview APK. We already had a SHA256 associated with our firebase project, the same key is also uploaded to EAS ( Expo Application Services). We faced no issues with phone login earlier.
Here are the errors from logcat
Failed to initialize reCAPTCHA config: No Recaptcha Enterprise siteKey configured for tenant/project *
[SmsRetrieverHelper] SMS verification code request failed: unknown status code: 18002 Invalid PlayIntegrity token; app not Recognized by Play Store. (Right, its a development build)
[GetAuthDomainTask] Error getting project config. Failed with INVALID_CERT_HASH 400 Failed to get reCAPTCHA token with error [There was an error while trying to get your package certificate hash.]- calling backend without app verification
[SmsRetrieverHelper] SMS verification code request failed: unknown status code: 17010 null
It seems like it has to do with the SHA keys, but not sure or understanding how exactly. Please advise.
P.S. : Link for Environment Details, gradles and android files
I only added SHA-256 which was working fine with other libraries thinking one fingerprint would suffice, however after adding SHA-1 it started working as expected.
They should have mentioned this in detail in the documentation.