Google Plus login gives error code 10 in signed io

2020-06-05 07:13发布

I'm developing an ionic application using google plus login. it was properly work when in developing. but in signed apk its give me error 10.
my code is below

      window.plugins.googleplus.login({
            scopes: 'profile', 
            webClientId: 'xxxxxx.apps.googleusercontent.com',
            offline: true 
      },function (user_data) {
        console.log(user_data)
      },function (msg) {
           alert(msg);
      });

I have generated a new SHA1 key and WebclientId by using realese keystore.
I think this is a SHA1 key problem, but i'm not get solution yet.

2条回答
Viruses.
2楼-- · 2020-06-05 07:59

First make sure you are saving your SHA-1 fingerprint (for debug and for release mode) on firebase enter image description here

I had this issue for days, my app was working fine when deployed to the device from the PC, in debug and release mode, login started falling when I published my app to the Android store, and install it from there, the problem was that the app signing was selected by default when you publish… enter image description here In order to fix this you have to get your SHA-1 fingerprint from the android developer console and add it to the firebase console… appsigningappsigning.png851x399 50.4 KB I’ve created a blog post explaining it in details here http://www.jomendez.com/2017/08/30/ionic-2-google-sign-in-error-10-with-firebase/

Hope it helps you ;)

查看更多
【Aperson】
3楼-- · 2020-06-05 08:07

I had glazed over this article as I was using android studio and not firebase so I never read it (wish I had). It was the same problem and solution as it relates registering the correct sha1 key from google play portal. Being new to android I opted in for google play app signing but was using my local release keystore sha1 and figured out the mistake after a day.

查看更多
登录 后发表回答