Example #1
0
export function withGithub() {
    Meteor.loginWithGithub({
        requestPermissions: GITHUB_SCOPE
    }, (err:Error) => {
        if (err) {
            console.error(err);
        }
    });
}
Example #2
0
/**
 * From Accounts, Meteor.users section
 */
Meteor.publish("userData", function () {
    return Meteor.users.find({ _id: this.userId },
        { fields: { 'other': 1, 'things': 1 } });
});

Meteor.users.deny({ update: function () { return true; } });

/**
 * From Accounts, Meteor.loginWithExternalService section
 */
Meteor.loginWithGithub({
    requestPermissions: ['user', 'public_repo']
}, function (err: Meteor.Error) {
    if (err)
        Session.set('errorMessage', err.reason || 'Unknown error');
});

/**
 * From Accounts, Accounts.ui.config section
 */
Accounts.ui.config({
    requestPermissions: {
        facebook: ['user_likes'],
        github: ['user', 'repo']
    },
    requestOfflineToken: {
        google: true
    },
    passwordSignupFields: 'USERNAME_AND_OPTIONAL_EMAIL'