After spending all day figuring out what the problem is. I found the culprit! We signed up for the Signing for Google Play app. We need to register SHA-1 in the application signature itself. You can find it in the Google Play console under Release Management> Application Signature. It will have two types of certificates: 1. Download certificate : this is the certificate information from the downloaded keystore. This should match the keystore for local signing of the application, as Google Play will check the downloaded application for compliance with the signed certificate.
2. Application signing certificate : after downloading the application, Google will replace the download certificate with this certificate. This is the new certificate that will be used for the published application on the Play Store.
With this information, I simply understand that we did not register SHA-1 for the application signing certificate used by the published application. So, I added the SHA-1 fingerprints (also SHA-256, just in case) in Firebase> Project settings for the application (do not forget to update the last configuration file after adding the fingerprints).
So after adding your SHA fingerprints, your Firebase SHA certificate fingerprints will look like this:

Now save the changes, then go back to your application and test it again, now it will work!
source share