Firebase Authentication – Phone – “INVALID_CERT_HASH”

0

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 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.

Solution

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

I hope your error will be solved.


If you have any question feel free to Contact Us.

Also you can always ask a question from CodeROG Community.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
CodeROG
Logo
Reset Password
Compare items
  • Total (0)
Compare
0
Shopping cart