Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@passport-next/passport-facebook

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@passport-next/passport-facebook - npm Package Compare versions

Comparing version 2.5.0 to 3.0.0

10

CHANGELOG.md

@@ -0,1 +1,11 @@

# 3.0.0 (2018-08-07)
* Made graphApiVersion a mandatory option @rwky
* Added tests using the live facebook graph api @rwky
* Removed deprecated username field @rwky
* Fixed birthday field not populating @rwky
* Set displayName to name field @rwky
* README.md updates @rwky
* Updated deps @rwky
# 2.5.0 (2018-07-07)

@@ -2,0 +12,0 @@

4

lib/profile.js

@@ -20,2 +20,5 @@ /**

middleName: json.middle_name };
if (typeof profile.displayName === 'undefined') {
profile.displayName = json.first_name + ' ' + json.middle_name + ' ' + json.last_name;
}

@@ -25,2 +28,3 @@ profile.gender = json.gender;

profile.ageRange = json.age_range;
profile.birthday = json.birthday;

@@ -27,0 +31,0 @@ if (json.email) {

11

lib/strategy.js

@@ -50,3 +50,6 @@ // Load modules.

options = options || {};
var graphApiVersion = options.graphApiVersion || Strategy.defaultGraphApiVersion;
var graphApiVersion = options.graphApiVersion;
if (!graphApiVersion) {
throw new Error('graphApiVersion is required');
}
options.authorizationURL = options.authorizationURL || 'https://www.facebook.com/' + graphApiVersion + '/dialog/oauth';

@@ -64,6 +67,2 @@ options.tokenURL = options.tokenURL || 'https://graph.facebook.com/' + graphApiVersion + '/oauth/access_token';

// Set the default API version once
Strategy.defaultGraphApiVersion = 'v2.12';
// Inherit from `OAuth2Strategy`.

@@ -129,3 +128,2 @@ util.inherits(Strategy, OAuth2Strategy);

* - `id` the user's Facebook ID
* - `username` the user's Facebook username
* - `displayName` the user's full name

@@ -219,3 +217,2 @@ * - `name.familyName` the user's last name

'id': 'id',
'username': 'username',
'displayName': 'name',

@@ -222,0 +219,0 @@ 'name': ['last_name', 'first_name', 'middle_name'],

{
"name": "@passport-next/passport-facebook",
"version": "2.5.0",
"version": "3.0.0",
"description": "Facebook authentication strategy for Passport.",

@@ -33,3 +33,3 @@ "keywords": [

"dependencies": {
"@passport-next/passport-oauth2": "1.5.x"
"@passport-next/passport-oauth2": "1.7.x"
},

@@ -40,3 +40,3 @@ "devDependencies": {

"chai": "4.x.x",
"chai-passport-strategy": "1.x.x"
"@passport-next/chai-passport-strategy": "1.1.x"
},

@@ -43,0 +43,0 @@ "engines": {

# passport-facebook
[![NPM version](https://img.shields.io/npm/v/@passport-next/passport-facebook.svg)](https://www.npmjs.com/package/@passport-next/passport-facebook)
[![Build Status](https://travis-ci.org/passport-next/passport-facebook.svg?branch=master)](https://travis-ci.org/passport-next/passport-facebook)

@@ -115,6 +116,8 @@ [![Coverage Status](https://coveralls.io/repos/github/passport-next/passport-facebook/badge.svg?branch=master)](https://coveralls.io/github/passport-next/passport-facebook?branch=master)

The Facebook profile contains a lot of information about a user. By default,
not all the fields in a profile are returned. The fields needed by an application
The Facebook profile contains a lot of information about a user. By default, only the name and id
fields are returned. The fields needed by an application
can be indicated by setting the `profileFields` option.
**You should not include both name and displayName, if name is specified displayName will automatically be populated**
```js

@@ -129,3 +132,3 @@ new FacebookStrategy({

Refer to the [User](https://developers.facebook.com/docs/graph-api/reference/v2.5/user)
Refer to the [User](https://developers.facebook.com/docs/graph-api/reference/user)
section of the Graph API Reference for the complete set of available fields.

@@ -163,3 +166,3 @@

By default, all calls are made to **v2.12** of the graph API. You can modify this by setting the `graphApiVersion` option when creating the strategy.
You must specify which version of the API to use when initiating the strategy by using the graphApiVersion option:

@@ -171,3 +174,3 @@ ```js

callbackURL: "http://localhost:3000/auth/facebook/callback",
graphApiVersion: 'v2.12'
graphApiVersion: 'v3.1'
}, ...)

@@ -174,0 +177,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc