Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding request header X-Hub-Signature validation #4

Merged
merged 3 commits into from
Jun 9, 2016
Merged

Adding request header X-Hub-Signature validation #4

merged 3 commits into from
Jun 9, 2016

Conversation

AnuiShark
Copy link
Contributor

This adds a few lines of code and a module express-x-hub to validate that POST requests to /facebook webhook endpoint are validated

@ghost ghost added the CLA Signed label Jun 8, 2016
var xhub = require('express-x-hub');

// use process.env.APP_SECRET from your facebook app settings
var XHUB_SECRET = '<use app secret from your facebook app settings>';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document this in graph-api-webhooks-samples/heroku/README.md and just use process.env.APP_SECRET on line 21 to keep the configuration separate.

- Updated Heroku read me with quick instructions on config vars
- Fixed a couple of if spacing nits
@adamgross42
Copy link
Contributor

Closes #2

@adamgross42 adamgross42 merged commit a59c4ba into fbsamples:master Jun 9, 2016
@adamgross42 adamgross42 mentioned this pull request Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants