r/Firebase • • 6d ago

Authentication Google play integrity API error while login using release apk build

Hi Guys! I am facing this problem while trying to authenticate using a new phone number. I am using firebase phone number authentication. The following suggested things are already done.

  1. Sha1 and Sha256 of debug, release and playstore are already in firebase settings under this project.

  2. Play integrity api is enabled and added in permitted apis.

  3. Firebase -> App checks -> Play integrity API advanced settings ->"
    Require app integrity label PLAY_RECOGNIZED is disabled
    "

  4. Google Clou console credentials - android and Browser api keys have been added with Play integrity api too.

  5. Google-services.json file has been newly added (I am not sure if this changes with all these change - I try to open everytime and its the same)

I need you help in understanding why still this is causing issue. Does anyone have any solution? Am I doing something wrong entirely? Kindly help.

1 Upvotes

1 comment sorted by

1

u/Practical_Affect4440 5d ago

Are you installing the release APK directly, or through a Play testing track? Firebase’s phone-auth docs say installs outside Google Play use the reCAPTCHA path on current SDKs. Since your screenshot says both checks failed, check whether the API key allows PROJECT_ID.firebaseapp.com for that fallback, and inspect the reCAPTCHA failure in logcat (redact phone numbers/tokens before sharing). Also, Phone Auth runs its Play Integrity check through a Firebase-owned Google project, so enabling that API in your own project isn’t the missing step. Which Firebase Auth SDK version are you using?