I think this is a bug in android, android studio or google.
I am able to login to google through the signed apk. But If I upload the same apk on play store it says me
I got this issue few days ago and i solved this by following the google guideliness
1.make sure the google JSON file your adding in App folder must be from the developer account. 2.Update all keys in the firebase account, release and debug key.
3.(important step): there is tab called "App signing" in Release management section in your google play console.
Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA1 key which you have to add in your firebase account.
after adding that SHA1 key to your Firebase account. try login, it works fine
I faced the same problem ... i searched a lot tell i found the solution here.
"Google has released a new signing service in playstore publish console in which google will signin your app with his keystore. After signing , it will give you a new SHA1 key which you have to add in your firebase account. after adding that SHA1 key to your Firebase account. try login, it works fine"
Thanks to https://stackoverflow.com/users/4943560/sanjay-km
I was using an existing project to create google sign in. I logged the issue on android as well, but didn't get response till now Issue Repoted Here.
So, I created a new Project with new packagename in Android Studio and copied paste all my required files (Resources and Java files only) from previous project. Created a new project for google sign in and followed the procedure by google
Now I was able to sign in properly.
I think (Not Sure) Android Saved some data from previous project in and it was not cleaned even after cleaning and rebuilding the project. So at last I had to create a new project.