Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase UI authentication with google fails with message (code:10 message:10)

I've made a chat app that uses Firebase's feature Real-time database. I face a problem with google authentication. The problem started when I downloaded the app from the Play Store, the authentication was working perfectly when I was running the app in debug mode. When users try to sign in they get a toast message code:10 message:10.

I would like to note here that: I've added the SHA1 fingerprint. How can I solve this?

*Not sure if this is helpful but I've followed step by step this tutorial

like image 628
Kwnstantinos Nikoloutsos Avatar asked Jul 16 '18 10:07

Kwnstantinos Nikoloutsos


People also ask

How do I get my Firebase authorization code?

To sign a user into your app, you first get authentication credentials from the user. These credentials can be the user's email address and password, or an OAuth token from a federated identity provider. Then, you pass these credentials to the Firebase Authentication SDK.


3 Answers

After generating SHA1 for release key, I forgot downloading the new google-service.json file that caused the same error.

Make sure you follow the instruction https://developers.google.com/android/guides/client-auth to generate and add debug/release SHA1 to firebase console and download google-service.json after updated.

If you use Use app signing by Google Play option, you need an additional step:

After uploading app into google play console, go to Release management > App signing, copy SHA1 and paste to firebase console enter image description here

Update

In the new google play console, the App signing key can be found as following: Setup > App signing enter image description here

like image 130
thanhbinh84 Avatar answered Oct 16 '22 16:10

thanhbinh84


You need three keys in order to make it work:

  1. The debug key. Informations here.

  2. The release key. Informations here.

  3. Google Play App signing key. Informations here.

All these keys are needed in order to make the sign-in process work.

Other informations here.

like image 21
Alex Mamo Avatar answered Oct 16 '22 15:10

Alex Mamo


Make sure you have added signed SHA1. If you are using debug one then it will not gonna work for live apk.

You need to put "debug.keystore" in this path C:\Users\USER_FOLDER_NAME.android

then in Android studio follow the below steps 1. Run your project 2. Click on Gradle menu 3. Expand Gradle Tasks tree 4. Double click on android -> signingReport

You can see SHA in Run Tab

for more information see link

like image 2
Riddhi Shankar Avatar answered Oct 16 '22 16:10

Riddhi Shankar