title: accessing github user data in meteor oauth
body: <p>I am trying to authenticate a user with github, then pass their <code>avatar_url</code> to the client. Simplified structure looks as follows.</p>
  
  <pre><code>server/
    publications.js
  client/
    users/
      login.js
    main.js
  </code></pre>
  
  <p>In my <code>client/users/login.js</code> file, I try to get the permission to the user Object which contains the avatar url</p>
  
  <pre><code>Accounts.ui.config({
    requestPermissions: {
      github: ['user']
    }
  });
  </code></pre>
  
  <p>Then in my <code>server/publications.js</code>, I try to publish <a href="https://developer.github.com/v3/users/" rel="nofollow">the data related to the avatar url</a>.</p>
  
  <pre><code>Meteor.publish('userData', function() {
    if(this.userId) {
      return Meteor.users.find(
        { _id: this.userId }, {
        fields: {
          'services.github.id': 1,
          'services.github.user.avatar_url': 1
        }
      })
    } else {
      this.ready();
    }
  });
  </code></pre>
  
  <p>However I never get the data related to the github user when I get my user object. How can I get access to the user with OAuth?</p>