Search code examples
androidfirebaseandroid-studiofirebase-authenticationone-time-password

How to disable OTP Captcha in android studio


I'm working on a Google sign in that sends an OTP to a phone number, however when I update the dependencies, a captcha appears. How can I get rid of it?

All methods are implemented by myself.

Using the Google Console, you can enable your Android Device Verification.

in firebase, add sha-256 and SHA-1 Also Add playconsole sha-1 and sha 256 as well.

However, the captcha is still not removed.

Is there anyone who can assist me with this?

here is dependencies

 implementation 'com.google.firebase:firebase-inappmessaging-display:20.1.1'
 implementation 'com.google.firebase:firebase-analytics:20.0.0'
 implementation 'com.google.android.gms:play-services-ads:20.4.0'
 implementation 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
 implementation 'com.facebook.android:facebook-share:12.1.0'
 implementation 'com.google.firebase:firebase-crashlytics'
 implementation 'com.google.firebase:firebase-analytics'
 implementation platform('com.google.firebase:firebase-bom:29.0.0')
 implementation 'androidx.browser:browser:1.2.0'
 implementation 'com.google.android.gms:play-services-safetynet:17.0.1'

these all dependencies i am using google play services dependencies are

 implementation 'com.google.android.gms:play-services-maps:18.0.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'

I also implement all methods that are answer in stackoverflow follow this link

Here is my gradebuild file

 dependencies {
    classpath 'com.android.tools.build:gradle:4.2.2'
    classpath 'com.google.gms:google-services:4.3.10'
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.0'

}

Solution

    1. Go to the settings in Firebase,

    2. Click on App Check,

    3. Click on the package name,

    4. Enable safetyname,

    5. Save.

    This should work if you implemented all methods.

    Use release Sha-1 and Sha-256.

    Enable Android device verification from the Google Console.