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

machinepack-facebook

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

machinepack-facebook - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

33

get-access-token.js

@@ -27,11 +27,38 @@ /**

example: 'AQDvCav5zRSafS795TckAerUV53xzgqRyrcfYX2i_PJFObCvACVRP-V7sfemiMPBh3TWypvagfZ6aoqfwKCNcBxg8XR_skdYUe5tsY9UzX9Z_8q4mRrqaLhwSh5OHj9ORmE4ocyd-neZtdceTZjlmEVeO38UH9QOe_md7h5hy2gMhOS6TL9IBk5Guxg3O6I0WmjpFNPoj6JzWIvG9cgj7RQqxMA2q_8EJxGPTqEbmTqOBqqCIOlvPEPCeIiy21VD9__tuzB0JvgqbVh-U_WW8mjwGBqsfxlNvjYwIxk4zBNAxuRJijkkn0TwyogFpZqIlkY',
description: 'The OAuth `code` generated by Facebook and sent to the `callbackUrl` if the user chooses to grant your app the requested permissions.'
description: 'The OAuth `code` generated by Facebook and sent to the `callbackUrl` if the user chooses to grant your app the requested permissions.',
required: true
},
callbackUrl: {
example: 'http://localhost:1337/user/facebook/login',
description: 'The URL which will be hit after the user successfully logs in. Usually contains some kind of identifying information about the user.'
description: 'The URL which will be hit after the user successfully logs in. Usually contains some kind of identifying information about the user.',
required: true
}
},
exits: {
error: {},
error: {
example: {
status: 400,
headers: {
'www-authenticate': 'OAuth "Facebook Platform" "invalid_code" "This authorization code has expired."',
'facebook-api-version': 'v1.0',
'content-type': 'application/json',
pragma: 'no-cache',
'access-control-allow-origin': '*',
'x-fb-rev': '1468811',
'cache-control': 'no-store',
expires: 'Sat, 01 Jan 2000 00:00:00 GMT',
'x-fb-debug': 'h2NQGoNXkWIAMJHeTFDSykKRKjYF+8j8stIRSH6ShpPVPVcc+OzAYghy/OMxTqp91WfQGaqDFScMAHUxi9A0+w==',
date: 'Sun, 26 Oct 2014 00:28:20 GMT',
connection: 'keep-alive',
'content-length': '95'
},
body: {
error: {
message: 'This authorization code has expired.',
type: 'OAuthException',
code: 100
}
}
}
},
success: {

@@ -38,0 +65,0 @@ description: 'The access token which allows you to do things and get information on behalf of a particular Facebook user.',

27

get-login-url.js

@@ -23,3 +23,4 @@ /**

example: 'http://localhost:1337/user/facebook/login',
description: 'The URL which will be hit after the user successfully logs in. Usually contains some kind of identifying information about the user.'
description: 'The URL which will be hit after the user successfully logs in. Usually contains some kind of identifying information about the user.',
required: true
},

@@ -39,12 +40,20 @@ permissions: {

if (!(inputs['client_id'] || inputs['appId'] || inputs['redirect_uri'])){
console.log('Error!');
return exits(new Error('At least one required param was not included'));
inputs.permissions = inputs.permissions || [];
try {
if (!(inputs['client_id'] || inputs['appId'] || inputs['redirect_uri'])){
console.log('Error!');
return exits(new Error('At least one required param was not included'));
}
return exits(null, util.format(
'https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s',
inputs.appId, inputs.callbackUrl, inputs.permissions.join(',')
));
}
return exits(null, util.format(
'https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s',
inputs.appId, inputs.callbackUrl, inputs.permissions.join(',')
));
catch(e) {
return exits.error(e);
}
}
};
{
"name": "machinepack-facebook",
"version": "0.1.1",
"version": "0.1.2",
"description": "Machines for working with the facebook.",

@@ -5,0 +5,0 @@ "scripts": {

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