androidgoogle-playgoogle-play-servicesgoogle-plusgoogle-plus-signin

Google Plus Login failed when uploaded to Google Play


I recently tried uploading the ionic release apk on Google Play. The app opens but google plus login doesn't work.

I googled various blogs and post but couldn't find the perfect one. Majorly has answer to the firebase one. But, here I'm using non firebase project which can be created in google console.

So, as per the process, I used the web client id of console project in my app, which was created by SHA of my local debug keystore. Then, I signed with the local keystore certificate and uploaded in the play console.

Catch is now, play console signs the apk with it's fingerprint. So, how should I move further to enable google plus signin into my app?

My thinking: I should use play's "app signing SHA" to create new "android" client in "console project" and use it instead of previous "web client id". And update that client id into my project. Now sign the apk with "upload apk" and then upload it on play. Can anyone tell, will it work?


Solution

  • Finally, able to deploy the apk on the play store after series of long documentations, blogs and fail attempts. I hope it could provide help to others.

    There is a slight different approach in deploying the apk with google plus sign-in on play store now. Earlier, one can sign the apk with the release key and later deploy it on playstore, but what if you want to upload it with "Google play app signing" enabled? Also, my app was in ionic and has non-firebase project on developer console.

    Workaround:

    So, considering the situation if you want to get it deployed on play store, follow steps:

    Follow these links -

    Integrate the new web client id everywhere in your app needed and then follow mentioned in ionic documentation - https://ionicframework.com/docs/v1/guide/publishing.html

    Catch is -

    Make sure to update your new generated release fingerprint, generated from command:

    • keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

    with the command :

    • keytool.exe -importcert -file upload_cert.der -keystore

    This will replace your certificate fingerprint from auto-generated to that of RSA fingerprint provided by Google Play Console. You can download the "upload certificate" in "upload_cert.der form" which will be used in above command.

    Now, with this, approach, your both certificates get used just as you use debug.keystore and release.keystore convertionally. Finally, following above link's steps, you will end up having compressed apk which you can further upload on google console.

    Now, scenario is, you have to maintain two projects on developer console, if you want it to get tested locally - either you have to maintain two different project ids or have android feature product flavour.

    Thank You!