简体   繁体   中英

Failed to generate/retrieve public encryption key for reCAPTCHA flow

i tried to disable the reCAPTCHA flow on my android app by following these steps.

remove reCaptcha by Enabling the Android Device Verification API in Your Project on google cloud console. You can do that by Adding Your Project there.

After that you should also add SHA-256 key in Your Firebase Project in Project Setting.

Now there will be no reCaptchaa to verify to that your are not a robot.

but it didnt work for me, instead of that i getting error while genrating OTP

Exception encountered during crypto setup:
Protocol message contained an invalid tag (zero).

KeysetManager failed to initialize - unable to get Public key

Could not generate an encryption key for reCAPTCHA - cancelling flow

Failed to get reCAPTCHA token with error [An internal error has occurred. [ Failed to generate/retrieve public encryption key for reCAPTCHA flow. ]]- calling backend without app verification

i'm getting this error while testing the app with Redmi note 5 pro,

while Samsung A20 and one plus9 are showing reCAPTCHA flow but getting OTP as the default behavior.

okay I found the solution for this problem, need to follow a few steps more in order to disable the reCAPTCHA flow

In Android, the solution was to enable agree the terms and conditions of the SafetyNet in FireBase Project settings under App Check tab.

Just Click on the App that you want to enable the SafetyNet on and a new checkbox will appear. Agree the term and vola the error is fixed.

Remove the project in firebase and re-create it with the same package name works for me

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM