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_loginwithexternal
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
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.