Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Plus login gives error code 10 in signed ionic app

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.

like image 233
Umesh Moradiya Avatar asked Aug 18 '17 12:08

Umesh Moradiya


1 Answers

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 ;)

like image 179
JoMendez Avatar answered Nov 15 '22 07:11

JoMendez