
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
node-fb-login
Advanced tools
Author : Arju S Moon
Facebook login modules, which can be used in your Node, Express.js Applications
Requires Node.js v12+ to run.
Install the dependencies and devDependencies and start the server.
$ npm install node-fb-login
const nodeFbLogin = require('node-fb-login');
// Generate authentication URL
nodeFbLogin.generateAuthURL({
fbAppID: "API_ID",
redirectURI: "REDIRECT_URI",
scopes:["public_profile","email"]
}).then(URL=>{
console.log(URL);
}).catch(error=>{
console.log(error);
})
// Get the short-lived Access Token by passing the code recieved from the Auth URL
nodeFbLogin.getAccessToken({
code: "AUTH_CODE",
fbAppID: "APP_ID",
fbAppSecret: "APP_SECRET",
redirectURI: "REDIRECT_URI"
}).then(accessToken => {
console.log(accessToken);
}).catch(error => {
console.log(error);
})
// Get the User profile by passing the Access Token
nodeFbLogin.getUserProfile({
accessToken:"ACCESS_TOKEN",
fields: ["id","name","email"]
}).then(user => {
console.log(user);
}).catch(error => {
console.log(error);
})
// Get long-lived Access Token by passing the short-lived access token (Valid for 60 days)
nodeFbLogin.getLongLivedAccessToken({
fbAppID: "APP_ID",
fbAppSecret: "APP_SECRET",
accessToken: "ACCESS_TOKEN"
}).then(accessToken => {
console.log(accessToken);
}).catch(error => {
console.log(error);
})
FAQs
Facebook login for Node.js projects
The npm package node-fb-login receives a total of 9 weekly downloads. As such, node-fb-login popularity was classified as not popular.
We found that node-fb-login demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.