Unable to use firebase auth, even after adding sha1 keys [SOLVED]

For using firebase auth in your application ,you need to add sha1 keys via firebase console, but if you have already added them and still its not working, then following the below steps will definitely help you:

step1 :

Login to firebase console and download the google-services.json file:

after opening the file ,you may notice that the sha1 keys are not displayed under the field certificate hash:

In the above screenshot ,the sha1 keys are shown along the field named "certificate hash", that's how it should be...
but for some reason ,the sha1 keys in the firebase console are not included in the google-service.json file, its probably a bug...

step-2: workaround

So ,to add the sha1 keys to the project ,you need to add/create credentials via google cloud platform:
=>go to the above link and select your project.
=>click on create credentials, and from dropdown box choose "OAuth client id"
=>choose your application type(in my case:android)

=>add the details of your app and the sha1 keys and then click create.

 and that's it ,now head back to the firebase console and download the google-services.json file and now you will notice that the sha1 keys you just added is shown in the file under the "certificate hash" field.


Popular posts from this blog

Python and C++ program to implement multiplication of 2d array (Matrix multiplication)

How to find and replace a node in Linked List

What is AI (Artificial Intelligence )? and its characteristics