'Firebase phone authentication is not working after upload app on playstore

I have no idea why it is happening. My app works fine with debug apk and signed apk. I have added the SHA1 key to firebase console also. But when i uploaded my app and installed it from Play Store then it is not sending the OTP to my phone number. Please help!

Thanks in advance



Solution 1:[1]

Using these steps you have successfully resolved all issues -:

  1. Go to google play console
  2. Setup -> App Integrity
  3. copy SHA-1 certificate fingerprint in (App signing certificate)
  4. Open Firebase console -> Project settings -> Add fingerprint
  5. Paste your SHA-1 key
  6. Now Reinstall your app from play

Solution 2:[2]

@HandyPawan's mentioned answer completely right here but as Google Console updated now the steps are -

  1. Go to google play console
  2. Release -> Setup -> App Integrity
  3. copy SHA-1 certificate fingerprint in (App signing certificate) but no include (SHA1: )
  4. Open Firebase console -> Project settings -> Add fingerprint
  5. Paste your SHA-1 key
  6. Now Reinstall your app from play

Solution 3:[3]

After you copied SHA1 key do you download google-services.json in your project?

Solution 4:[4]

In my situation I uploaded to the Play Store signed with my existing SHAs, which have been set in my Firebase App fingerprints for a long time with SMS autocomplete working fine. I also see the same SHA keys listed in the Play Store for my app.

However now the SMS outbound txt looks different and shows my package name with "(unverified)", and no 11 digit hash at the end as before. Needless to say, the autocomplete is no longer working.

Can you confirm you are seeing the 11 char hash at the end of the SMS messages being received? There have been reports that long package names, along with the "(unverified)" appended, may be causing the message to truncate, thereby removing the ending hash.

In which case once verified the package name will be replaced with the app name, the "(unverified)" removed, which should shorten the overall message to include the end hash again.

Solution 5:[5]

In my case, SHA-1 alone didn't work until I pasted my SHA-256.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 Kushal Sharma
Solution 3 user2930077
Solution 4 Pip
Solution 5 Justice Mba