The following error is occur when I try to run the phone authentication in the local android device.
[GetAuthDomainTask] Error getting project config. Failed with {
E/FirebaseAuth(25345): "error": {
E/FirebaseAuth(25345): "code":400,
E/FirebaseAuth(25345): "message": "INVALID_CERT_HASH",
E/FirebaseAuth(25345): "errors": [ E/FirebaseAuth(25345): {
E/FirebaseAuth(25345): "message": "INVALID_CERT_HASH",
E/FirebaseAuth(25345): "domain": "global",
E/FirebaseAuth(25345): "reason": "invalid"
E/FirebaseAuth(25345): }
E/FirebaseAuth(25345): ]
E/FirebaseAuth(25345): }
E/FirebaseAuth(25345): }
I have refer to stackoverflow comment. But I do stated my SHA-1 and SHA-256 in the project. Since my SHA-1 and SHA-256 is existing, I run the command below in the keystore located folder. Everything is seen normal. Can anyone show what have I miss out?
keytool -list -v -keystore my_keystore.jks
Create fictional phone numbers and verification codes In the Firebase console, open the Authentication section. In the Sign in method tab, enable the Phone provider if you haven't already. Open the Phone numbers for testing accordion menu. Provide the phone number you want to test, for example: +1 650-555-3434.
Prices are per successful verification. On the Blaze plan, Phone Authentication provides a perpetual free tier. The first 10K verifications for both instances (USA, Canada, and India and All other countries) are provided for free each month. You are only charged on usage past this free allotment.
Don't forget to go in Firebase Project Settings > App check > and Register firebase project in SafetyNet and Play Integrity register with default time token 1 hour and u will remove reCaptcha from phone auth OTP! That's awesome.
To solve this error, you need to add both your keystore SHA1 and SHA56 as well as debug SHA1 and SHA256 to fireabse console.
That means two SHA1 and two SHA256
For debug keys use https://developers.google.com/android/guides/client-auth?authuser=1 to get the key, use ./gradlew signingReport
or .\gradlew signingReport
if in windows to get debug keys.
For release keys use Keystore explorer to see the SHA1 and SHA256.
If the issue persists after changing your SHA1 and SHA256 make sure the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With