Home » Android » Android [App Validation Failed] phone authentication error on Firebase

Android [App Validation Failed] phone authentication error on Firebase

Posted by: admin November 1, 2017 Leave a comment

Questions:

I have attached firebase on my existing android project and ran it. Here is the scenario:
If the app ran from android studio via developer mode, it(Firebase sign in via phone number) runs smoothly and I manage to log in.
However, whenever I build signed debug apk, Firebase does not allow to sign in. It gives the following message:

This app is not authorized to use Firebase authentication. Please
verify the correct package name and SHA-1 are configured in the
firebase console (App Validation Failed).

I have SHA-1 and SHA-256 key installed on Firebase console generated from my windows machine.

I would have normally provided the code however, I am guessing there is nothing wrong with the code. It works fine with the debug process. I have changed to the up-to-date google-services file from console.

Any help would be highly appreciated. Thanks in advance.

Answers:

Here is my error:
When debugging, I used the normal debug key from .android/debug.keystore and this key is stored in the Firebase SHA1 field.So it worked perfectly. While trying to create a signed version, I generated a separate keystore file and created signed apk using that. Now, since the SHA1 key varied from the debug, the app was not recognized on the firebase console.
I changed the signed key to debug key. I did not want to go through a lot of changes.