-make sure that your release and debug bundle identifier should be the same
it happens when your release bundle identifier is different
and make sure you implement BOM bill of material it is necessary from the latest versions of firebase
implementation platform('com.google.firebase:firebase-bom:26.2.0')
. If need be, create a new OAuth Client, new configuration file (the google-services.json) file and do everything step-by-step.
Also try adding a Web Client giving the same credentials. And for Android as well as Web client give both the SHA1 for debug as well as the release keystores. In Android Studio, at extreme left you will see a tab saying "Build Variants". Select the release mode there and do everything after that.