Skip to content

Instantly share code, notes, and snippets.

View chanpory's full-sized avatar

Chanpory Rith chanpory

  • San Francisco
  • 13:58 (UTC -07:00)
View GitHub Profile
@sunny-g
sunny-g / meteor-github-oauth.js
Last active June 12, 2017 06:37
How to create Github OAuth credentials and access tokens with Meteor, without logging-in the user nor using accounts-github
if (Meteor.isClient) {
Template.hello.events({
'click .github': function() {
// initiate the OAuth process:
// ask for the desired permissions
// run the callback after the user authorizes the app
// https://github.com/meteor/meteor/blob/devel/packages/github/github_client.js#L8
Github.requestCredential({
loginStyle: 'popup',
requestPermissions: ['gist']