Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Google sign-in working for Meteor on iOS?

I'm setting up a Meteor app and using Google sign-in for the first time. This works fine in the web-app version of the app. However, when building the app for iOS, this generates a problem.

I do this:

meteor run ios-device --mobile-server https://myapp.meteorapp.com

Then get this:

Failed to install 'cordova-plugin-googleplus':Error: Variable(s) missing: REVERSED_CLIENT_ID

And

While adding plugin https://github.com/meteor/cordova-plugin-googleplus.git#blabla to Cordova project: Error: Variable(s) missing: REVERSED_CLIENT_ID

How to resolve this?

like image 236
MastaBaba Avatar asked Oct 29 '22 08:10

MastaBaba


1 Answers

You need to do 2 things.

  1. create a credential
  2. add it to your mobile-config.js

Go to the same place you created your webapp credential. Something like this: https://console.developers.google.com/apis/credentials?project=YOURPROJECT

Click the Create Credential button... pick OAUTH... and then pick IOS.

Enter your info... and then take that number and paste it into you mobile-config.js file like this:

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

click the CREATE credential

like image 76
Eric Oemig Avatar answered Nov 15 '22 05:11

Eric Oemig