UNPKG

node-uglifier-es

Version:

Fully auto merging and uglifying a whole NodeJs project into one file with external files option. Recompiled from Zsolt Istvan Szabo's work with uglify-es instead of uglify-js-harmony.

40 lines (36 loc) 1.1 kB
'use strict'; /** * Module dependencies. */ var passport = require('passport'), url = require('url'), GithubStrategy = require('passport-github').Strategy, config = require('../config'), users = require('../../app/controllers/users'); module.exports = function() { // Use github strategy passport.use(new GithubStrategy({ clientID: config.github.clientID, clientSecret: config.github.clientSecret, callbackURL: config.github.callbackURL, passReqToCallback: true }, function(req, accessToken, refreshToken, profile, done) { // Set the provider data and include tokens var providerData = profile._json; providerData.accessToken = accessToken; providerData.refreshToken = refreshToken; // Create the user OAuth profile var providerUserProfile = { displayName: profile.displayName, email: profile.emails[0].value, username: profile.username, provider: 'github', providerIdentifierField: 'id', providerData: providerData }; // Save the user OAuth profile users.saveOAuthUserProfile(req, providerUserProfile, done); } )); };