I am a Meteor newbie and just ran into a problem using accounts-google (see below). All I did was follow the instructions on http://docs.meteor.com/#meteor_loginwithexternalservice. Any ideas on how to solve this issue and get Google login working? Thanks!
Terminal output:
W20141003-09:42:57.115(7)? (STDERR)
W20141003-09:42:57.116(7)? (STDERR) /Users/aw/.meteor/packages/meteor-tool/.1.0.33.alt9dq++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/future.js:173
W20141003-09:42:57.116(7)? (STDERR) throw(ex);
W20141003-09:42:57.117(7)? (STDERR) ^
W20141003-09:42:57.118(7)? (STDERR) ReferenceError: ServiceConfiguration is not defined
W20141003-09:42:57.119(7)? (STDERR) at app/server/accounts.js:26:1
W20141003-09:42:57.120(7)? (STDERR) at app/server/accounts.js:35:3
W20141003-09:42:57.120(7)? (STDERR) at /Users/aw/TS/.meteor/local/build/programs/server/boot.js:168:10
W20141003-09:42:57.120(7)? (STDERR) at Array.forEach (native)
W20141003-09:42:57.121(7)? (STDERR) at Function._.each._.forEach (/Users/aw/.meteor/packages/meteor-tool/.1.0.33.alt9dq++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/lib/node_modules/underscore/underscore.js:79:11)
W20141003-09:42:57.121(7)? (STDERR) at /Users/aw/TS/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
When I comment out my service configuration code (below)
// first, remove configuration entry in case service is already configured
ServiceConfiguration.configurations.remove({
service: "google"
});
ServiceConfiguration.configurations.insert({
service: "google",
clientId: "xxxxxxxx",
secret: "xxxxxxxxx"
});
It asks me to enter the clientId and secret from the bootstrap dropdown gui. Then nothing happens after that.
After I add service-configuration, I get the following error after logging in:
It turns out that in addition to meteor add service-configuration
, you have to complete a minimum of all of the following in Google's API website:
Steps 9 & 10 appear to be new requirements from Google in the past few days. See this Github ticket regarding the issue.
You need to meteor add service-configuration
manually.
The rest of your code looks good to me.
You also need to make sure that you configured things correctly in the Google Developers Console.
Add http://localhost:3000/_oauth/google?close
in the REDIRECT URIS section, as well as http://localhost:3000/
for the JAVASCRIPT ORIGINS section.
This is for testing purpose on localhost, you'll need to add your deployed app actual ROOT_URL (http://www.example.com/
) when pushing to production.
I addressed a similar problem here :
Meteor.user is null after (apparently) successful login
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With