I\'m using Firebase Google Sign in. It works perfectly via USB debugging. But when I generate signed APK, it stops working. Its not able to sign in. Using it on Android 5.1
I had the same problem and I fixed the problem using these methods.
Complete app signing on your Play store console using these instructions How to enable Google Play App Signing
Go to your Firebase console Settings > General > Your apps > (Select your project) then add the SHA-1 from App signing certificate from your Play store. You can get SHA-1 by going to Release management -> App signing as show in this image.