Closed dman777 closed 8 years ago
var fbOptions = { authType: 'rerequest', scope : ['public_profile', 'email'] }; auth.route('/auth/facebook') .get(passport.authenticate('facebook', fbOptions));
'facebookAuth' : { 'clientID' : 'xxx', // your App ID 'clientSecret' : 'xxx', // your App Secret 'callbackURL' : 'http://xxxx:8000/auth/facebook/callback', 'profileFields' : ['emails', 'link'] },
email
emails
profileFields
{ id: 'xxxx', username: undefined, displayName: 'Darin Hensley', name: { familyName: undefined, givenName: undefined, middleName: undefined }, gender: undefined, profileUrl: undefined, provider: 'facebook', _raw: '{"name":"Darin Hensley","id":"xxxx"}', _json: { name: 'Darin Hensley', id: 'xxx' } } { facebook: { id: 'xxxx', token: 'xxxx', name: 'Darin Hensley' } }
one@development ~/github/dolphin $ cat node_modules/passport-facebook/package.json { "_args": [ [ { "raw": "passport-facebook", "scope": null, "escapedName": "passport-facebook", "name": "passport-facebook", "rawSpec": "", "spec": "latest", "type": "tag" }, "/home/one/github/dolphin" ] ], "_from": "passport-facebook@latest", "_id": "passport-facebook@2.1.1", "_inCache": true, "_installable": true, "_location": "/passport-facebook", "_nodeVersion": "4.2.1", "_npmOperationalInternal": { "host": "packages-16-east.internal.npmjs.com", "tmp": "tmp/passport-facebook-2.1.1.tgz_1463512414599_0.7715082890354097" }, "_npmUser": { "name": "jaredhanson", "email": "jaredhanson@gmail.com" }, "_npmVersion": "2.14.7", "_phantomChildren": {}, "_requested": { "raw": "passport-facebook", "scope": null, "escapedName": "passport-facebook", "name": "passport-facebook", "rawSpec": "", "spec": "latest", "type": "tag" }, "_requiredBy": [ "#USER", "/" ], "_resolved": "https://registry.npmjs.org/passport-facebook/-/passport-facebook-2.1.1.tgz", "_shasum": "c39d0b52ae4d59163245a4e21a7b9b6321303311", "_shrinkwrap": null, "_spec": "passport-facebook", "_where": "/home/one/github/dolphin", "author": { "name": "Jared Hanson", "email": "jaredhanson@gmail.com", "url": "http://www.jaredhanson.net/" }, "bugs": { "url": "http://github.com/jaredhanson/passport-facebook/issues" }, "dependencies": { "passport-oauth2": "1.x.x" }, "description": "Facebook authentication strategy for Passport.", "devDependencies": { "chai": "2.x.x", "chai-passport-strategy": "1.x.x", "make-node": "0.3.x", "mocha": "1.x.x" }, "directories": {}, "dist": { "shasum": "c39d0b52ae4d59163245a4e21a7b9b6321303311", "tarball": "https://registry.npmjs.org/passport-facebook/-/passport-facebook-2.1.1.tgz" }, "engines": { "node": ">= 0.4.0" }, "gitHead": "2b74dd0eff976e85b029178e8012cb3703231112", "homepage": "https://github.com/jaredhanson/passport-facebook#readme", "keywords": [ "passport", "facebook", "auth", "authn", "authentication", "identity" ], "license": "MIT", "licenses": [ { "type": "MIT", "url": "http://opensource.org/licenses/MIT" } ], "main": "./lib", "maintainers": [ { "name": "jaredhanson", "email": "jaredhanson@gmail.com" } ], "name": "passport-facebook", "optionalDependencies": {}, "readme": "ERROR: No README data found!", "repository": { "type": "git", "url": "git://github.com/jaredhanson/passport-facebook.git" }, "scripts": { "test": "mocha --require test/bootstrap/node test/*.test.js" }, "version": "2.1.1" }
This is due to user error. My apologies.
Note ^ I have tried both
email
andemails
inprofileFields