<commit_before>var FacebookStrategy = require('passport-facebook').Strategy;
var db = require('../db');
var localServices = require('../config/environment/thirdPartyServices');
var config = require('../config/environment');
// var client = require('./facebookAuthInfo.js');


module.exports = function(passport){

  //The Facebook strategy allows users to log in to a web
  //application using their Facebook account.
  passport.use(new FacebookStrategy({

  //clientID and clientSecret need to remain private
  //we need to add this information to heroku
  clientID: config.facebook.id,
  clientSecret: config.facebook.secret,
  callbackURL: config.facebook.callback

   }, function(token, refreshToken, profile, done){
    // console.log(profile.id);

    db.User.find({where: {'facebook_id' : profile.id}})
      .then(function(user){
        if(!user){
          // console.log('creating new user');
          db.User.create({
            username: profile.name.givenName,
            facebook_id: profile.id
          })<commit_msg>Removed comments for local services and client<commit_after>var FacebookStrategy = require('passport-facebook').Strategy;
var db = require('../db');
var config = require('../config/environment');


module.exports = function(passport){

  //The Facebook strategy allows users to log in to a web
  //application using their Facebook account.
  passport.use(new FacebookStrategy({

  //clientID and clientSecret need to remain private
  //we need to add this information to heroku
  clientID: config.facebook.id,
  clientSecret: config.facebook.secret,
  callbackURL: config.facebook.callback

   }, function(token, refreshToken, profile, done){
    // console.log(profile.id);

    db.User.find({where: {'facebook_id' : profile.id}})
      .then(function(user){
        if(!user){
          // console.log('creating new user');
          db.User.create({
            username: profile.name.givenName,
            facebook_id: profile.id
          })
{'fraction_non_alphanumeric': 0.1280241935483871, 'fraction_numerical': 0.0, 'mean_word_length': 3.2780172413793105, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5499534', 'n_tokens_mistral': 542, 'n_tokens_neox': 526, 'n_words': 148}