This error is related as we mentioned above with the signature of your app, there are two types of SHA1, the debug and the release, the debug you can find it in the following way
You go to the tab on the top right and clickas gradle - tu proyecto - tasks - signingReport
Then below you will see your SHA1 (this is debug, right image)
Now, in your build.gradle it tells you the package you should sign in with Firebase Console .
To get the production SHA1 or Release, open the terminal in the android studio and do the following, you position yourself in the bin folder that comes with the SDK, you usually find it in the javac
folder (usually in C:\Program Files\Java\jdk1.6.0_14\bin
). Then you write the following
keytool -list -v -keystore {keystore_name} -alias {alias_name}
for example
keytool -list -v -keystore C:\Usuario\tu_usuario\Desktop\prueba.jks -alias prueba
SHA1 production should be what you would use when your app is in the PlayStore