2

I'm facing very strange behavior of Firebase. Everything is working fine when I first time upload my apk in play store. After few days when I update my apk. Now it show This app is not authorized to use Firebase Authentication. check the screen shot. I read my answers on StackOverFlow. Almost all of them point that there is some problem in package name or in SHA-1 But in my case everything is perfect when I install app using android studio it's working fine but when I upload it on play store after this it does not work. And the strange thing is that when I enter any test phone it's working but not with the original phone number. I'm using real device. If there is any problem in package name or in SHA-1 then why it's working for test phone numbers ?

This app is not authorized to use Firebase Authentication

UPDATE

I tried almost all the methods but no one is working for me.

I create sha-1 using this.

 keytool -list -v -keystore "key store path" -alias "key alias"

output is something like 96:A2:-------------------- I add this into firebase and generate new google_services.json file and place it into android project and upload apk to play store but when I try to run app it show me same error(app not authorized).

After this I try to create SHA-1 from android studio. using

Gradle -> appName -> android -> signingReport

It show something like B0:F7:----------------------------- I add it into firebase console and generate google_servics.json file after uploading apk is not working.

After this I try

tools -> firebase -> auth -> connect -> sync

This one is also not working.

And after this I try to add both SHA-1 in firebase console still not working.

Can you please let me know what can be problem ?

  • did you use seperate keystore for signing debug and release builds? if yes, do you have SHA1 of both added in firebase console? – Anoop Sep 12 '18 at 04:40
  • Check **[this](https://stackoverflow.com/questions/51360250/firebase-ui-authentication-with-google-fails-with-message-code10-message10/51360406#51360406)** out. – Alex Mamo Sep 12 '18 at 12:59
  • Application is working fine with test phone numbers but not with original phone numbers. If the problem is SHA-1 then it must not work with test phone numbers. There is another problem – World Programing Sep 12 '18 at 14:11
  • I already try to added SHA-1 and update app but still same problem. How I update the SHA1 `tools->firebase->authentication->connect->sync` but still same issue – World Programing Sep 12 '18 at 14:16
  • @AlexMamo Thing that is confusing me is that if there is SHA-1 problem then how it's working for test phone numbers ? – World Programing Sep 12 '18 at 14:21

1 Answers1

0

First copy your google-services.json file again to your project. Then you must be having your keystore for your release apk. So in order to obtain the SHA1 of your release app.

  • Go to your /bin in JDK directory.
  • And run the following command in your cmd.

    keytool -list -v -keystore "key store path" -alias "key alias"
    

This command will give you all the required details of your release version. Copy the SHA1 string and add it to your firebase console.

You are good to go.

Zankrut Parmar
  • 1,872
  • 1
  • 13
  • 28