I'm facing an issue with Firebase Phone Authentication in my Android app. When I try to authenticate, I see the following error in the logs:
ForceRecaptchaV2Flow from phoneAuthOptions = false, ForceRecaptchav2Flow from firebaseSettings = false
W/System (27157): Ignoring header X-Firebase-Locale because its value was null.
E/zzb (27157): Failed to initialize reCAPTCHA config: No Recaptcha Enterprise siteKey configured for tenant/project *
W/System (27157): Ignoring header X-Firebase-Locale because its value was null.
I/PlayCore(27157): UID: [12418] PID: [27157] IntegrityService : requestIntegrityToken(IntegrityTokenRequest{nonce=2WSJ5e037AiyKOeVR20qvii2smtI8flclRnpuMm65mw, cloudProjectNumber=551503664846, network=null})
...
E/AndroidRuntime(27157): FATAL EXCEPTION: Firebase Blocking Thread #0
E/AndroidRuntime(27157): Process: com.bestflux.btown, PID: 27157
What I've tried:
Verified that the reCAPTCHA Enterprise API is enabled in my Google Cloud Console.
Created a reCAPTCHA Enterprise key in the Google Cloud reCAPTCHA Enterprise dashboard.
Ensured that my Firebase project is linked to the same Google Cloud project where reCAPTCHA Enterprise is enabled.
Checked that Phone Authentication is enabled in the Firebase Console under Authentication → Sign-in method → Phone.
Confirmed that I am using the latest versions of firebase_auth and firebase_core packages.
Verified that my app’s SHA-1 and SHA-256 fingerprints are correctly added in the Firebase project settings.
Observed that both ForceRecaptchaV2Flow flags in phoneAuthOptions and firebaseSettings are set to false.
My questions:
Is there an additional configuration step required to pass the reCAPTCHA Enterprise siteKey to Firebase Authentication, or should this be automatically retrieved?
Could a misconfiguration between my Firebase project and Google Cloud project cause this error?
Are there known issues or workarounds with the current Firebase Phone Auth implementation regarding reCAPTCHA Enterprise integration?