9

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

CLKH
  • 137
  • 1
  • 5

1 Answers1

15

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:

  1. Change the google-services.json file again.
  2. Delete the app in settings and add a new one with the right SHA1
alexalejandroem
  • 1,094
  • 12
  • 17
Rohit Mahto
  • 176
  • 1
  • 9