1

I've built the App on android studio. When I connect my phone to my PC and build it directly through Android Studio it works. I get the phone verification code and am able to sign in. But when I generate a signed APK to distribute it to others, it always says "Verification Failed" and doesn't let me sign in.

I'm pretty sure there's no problem with the code, because it works perfectly when I build it through Android Studio directly onto my phone.

What Ive Tried:-

  1. I followed the steps in this link and changed the SHA-1 code in my firebase console to the one provided in my Google Console, it still says verification failed.

  2. I also tried to keep only one SHA-1 key in my firebase console which is the one i found in my android project, updated the google-services.json file and tried generating a signed APK, its still says verification failed.

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Sampurna
  • 205
  • 2
  • 9

1 Answers1

0

Generate a new SHA1 fingerprint from the console in Android Studio using

keytool -list -v -keystore <absolute path of Keys generated during signed APK generation> -alias <app alias name>

Paste the generated fingerprint in the firebase console and delete the older one. Hope this works!

mayur
  • 374
  • 1
  • 10
  • Thanks mate!!! I did not know that the key store that signs the APK also has a different SHA-1 code which needs to be present in the Firebase Console – Sampurna Apr 05 '20 at 10:06
  • 1
    Glad to help! If it worked, do consider accepting the answer. – mayur Apr 05 '20 at 11:34