79fb7810d1b5e6a47ce41726141d6774f210e432
[motion.git] / server / auth / facebook / passport.js
1 var _0x54e2=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x54e2[0]);var FacebookStrategy=require(_0x54e2[2])[_0x54e2[1]];exports[_0x54e2[3]]=function(_0x8803x3,_0x8803x4){passport[_0x54e2[17]]( new FacebookStrategy({clientID:_0x8803x4[_0x54e2[5]][_0x54e2[4]],clientSecret:_0x8803x4[_0x54e2[5]][_0x54e2[6]],callbackURL:_0x8803x4[_0x54e2[5]][_0x54e2[7]]},function(_0x8803x5,_0x8803x6,_0x8803x7,_0x8803x8){_0x8803x3[_0x54e2[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0x8803x7[_0x54e2[8]]},function(_0x8803x9,_0x8803xa){if(_0x8803x9){return _0x8803x8(_0x8803x9)};if(!_0x8803xa){_0x8803xa= new _0x8803x3({name:_0x8803x7[_0x54e2[9]],email:_0x8803x7[_0x54e2[11]][0][_0x54e2[10]],role:_0x54e2[12],username:_0x8803x7[_0x54e2[13]],provider:_0x54e2[5],facebook:_0x8803x7[_0x54e2[14]]});_0x8803xa[_0x54e2[15]](function(_0x8803x9){if(_0x8803x9){_0x8803x8(_0x8803x9)};return _0x8803x8(_0x8803x9,_0x8803xa);});}else {return _0x8803x8(_0x8803x9,_0x8803xa)};})}))};