Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Remove username from facebook strategy
Browse files Browse the repository at this point in the history
Username is now deprecated on Facebook API 2.0
  • Loading branch information
igorauad committed Jan 30, 2015
1 parent 90c9ddb commit 9929f1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/users/server/config/strategies/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(config) {
clientID: config.facebook.clientID,
clientSecret: config.facebook.clientSecret,
callbackURL: config.facebook.callbackURL,
profileFields: ['id', 'name', 'displayName', 'email', 'username', 'photos'],
profileFields: ['id', 'name', 'displayName', 'emails', 'photos'],
passReqToCallback: true
},
function(req, accessToken, refreshToken, profile, done) {
Expand All @@ -29,7 +29,6 @@ module.exports = function(config) {
lastName: profile.name.familyName,
displayName: profile.displayName,
email: profile.emails[0].value,
username: profile.username,
profileImageURL: (profile.photos && profile.photos.length) ? profile.photos[0].value : undefined,
provider: 'facebook',
providerIdentifierField: 'id',
Expand Down

0 comments on commit 9929f1b

Please sign in to comment.