Google Plus (Mobile) Sign In Error - Please Help


#1

Hi Everyone,

I am integrating Google Plus login in Android and using cordova-google-plus-native-sign-in

After adding this into command line

meteor add hedcet:cordova-google-plus-native-sign-in

I have added the following code to my mobile-config.js to

App.configurePlugin('cordova-plugin-googleplus', {
    REVERSED_CLIENT_ID: 'com.googleusercontent.apps.--------------------------------------------'
});

and here is the code for authentication with Google

window.plugins.googleplus.login({
      offline: true,
      webClientId: '-------------------------------.apps.googleusercontent.com',
    },

    function(response) {
      request.email = response.email;
      request.idToken = response.idToken;
      request.userId = response.userId;
    },

    function(error) {
      if (callback && (typeof callback == "function")) {
        callback(error);
      }
    });

googleplus’ is not defined,

Error in Detail:

Uncaught TypeError: Cannot read property 'googleplus' of undefined", source: http://localhost:12240/app/app.js?hash=c41a5f758e3a9cdfc5ec60f0eb64150065ec031e (3344)

I am stuck in this issue for the last 5 days, I have already posted here but not getting any response from the community. Please Guys, this needs to be solved asap. Please help. It’s very urgent.


#2

That error suggests it’s window.plugins which is undefined

Other than that, I’ve not used this, so can’t help. Sorry.


#3

Hi @robfallows, Thanks for your response. Do you know any other library for Google login integration.


#4

No, sorry. Have you tried cordova.plugins.googleplus?


#5

Are you talking about library that is on npm or replacing window.plugins with cordova.plugins?


#6

That. I don’t do any cordova development, so feel free to ignore me :slight_smile:


#7

Thanks @robfallows, for your time


#8

@mixmatric, why do not you use meteor accounts for google?


#9

I am using accounts-google package and it’s not working in mobile.
I got multiple dex files error


#10

What is error? Because I use in my app, Google e Facebook logins, in web, android and ios, and all works fine.

Do you can debug in android and show me the error?


#11

Actually what I think is I have used multiple google libraries and the error is I am not able to compile the project and get the output code for android. Check this link Multiple dex files define Lcom/google/android/gms/iid/zzc for the error I got.

I need to use Push notifcation, Maps, and Logins from Google. It would really be great help to me if you could help me in this.


#12

Thanks for your kind information. It is also benefited for all users.

toronto seo