I'm getting an exception while trying to phone auth. The app is working fine in app-debug
but when I generate app-release
, the Firebase exception throw that this app is not authorised to use Firebase Authentication.

- 130,605
- 17
- 163
- 193

- 1,168
- 1
- 11
- 15
-
Have you added the release SHA-1 certificate fingerprint in your Firebase Console? – Alex Mamo Sep 06 '18 at 08:56
-
i added sha1 key during setup of firebase project... now what should i do? – Syed Hussain Mehdi Sep 06 '18 at 08:59
2 Answers
In order to make the authentication process of an app work also when you have published it to Play Store, the release SHA-1 certificate fingerprint
is needed. So please add this certificate in your Firebase Console using the instructions that you can find in this post.
In the end, just download the JSON file again from Firebase Console and put in the right place. Updated the app that contains the new changes in Play Store and you're done.
If you intend to add also Google Autehntication
, you'll find more informations here.

- 130,605
- 17
- 163
- 193
-
what should I do ?I need to publish this app on play store first? – Syed Hussain Mehdi Sep 06 '18 at 09:46
-
It doesn't matter. If is have already added it to Play Store, then just add the `release SHA-1 certificate fingerprint` to your Firebase Console and your will work perfectly fine. Have you tried it? – Alex Mamo Sep 06 '18 at 09:48
-
i'm not able to generating release SHA-1 certificate fingerprint, could you help me regarding this. – Syed Hussain Mehdi Sep 06 '18 at 09:54
-
You need to to follow the instructions in that answer yourself, and ask another question if something else comes up. – Alex Mamo Sep 06 '18 at 09:59
-
i generated sha1 key and added to firebase console but same error i'm getting. What i am missing? – Syed Hussain Mehdi Sep 06 '18 at 12:40
-
1Are you having now 2 different keys, one for debug and one for release? Have you download the JSON file **again** and put in the right place? Have you updated the the app that contains the new changes in Play Store? – Alex Mamo Sep 06 '18 at 12:56
-
1Thank you bro, Now its working fine.. Thanks for help me :) – Syed Hussain Mehdi Sep 06 '18 at 16:57
-
Please don't forget to accept the answer to help also future visitors. Thanks! – Alex Mamo Sep 07 '18 at 08:02
You need your SHA1 fingerprint, as stated before. Go to your Android Studio Project, open the gradle tab on the right, go to tasks > android > signingReport. Execute the signingReport Task (double click), and then copy the SHA1 code from your console

- 791
- 8
- 15
-
this will generate only for debug, i want yo generate for release app – Syed Hussain Mehdi Sep 06 '18 at 10:12
-
1https://developer.android.com/studio/publish/app-signing here you can find more information about what you need – Martin Nowosad Sep 06 '18 at 14:54