Search code examples
meteormeteor-accounts

Why aren't I getting any email addresses in my Meteor user object?


I'm using Meteor 1.0 with accounts-google login service.

I request these permissions

requestPermissions:
  google: [
    'https://www.googleapis.com/auth/calendar',
    'https://www.googleapis.com/auth/userinfo.profile'
  ]

After successful login and when I look at the user object in the Mongo shell on the server I am not seeing any emails at all anywhere in the User document.

I am under the impression that Meteor will store whatever email address was used to login to Google somewhere.

How do I get the email?


Solution

  • Apparently I needed to ask for the permission:

    "https://www.googleapis.com/auth/userinfo.email"

    Now it works.