Created
June 24, 2014 12:46
-
-
Save sebdah/6c07f113654c6e5e341f to your computer and use it in GitHub Desktop.
Accessing GitHub user data in Meteor client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Accounts.onCreateUser(function(options, user) { | |
if (options.profile) { | |
user.profile = options.profile; | |
} | |
user.profile.github = {}; | |
user.profile.github.accessToken = user.services.github.accessToken; | |
user.profile.github.email = user.services.github.email; | |
user.profile.github.username = user.services.github.username; | |
return user; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment