{"action":"opened","issue":{"url":"https://api.github.com/repos/jaredhanson/passport-facebook/issues/187","repository_url":"https://api.github.com/repos/jaredhanson/passport-facebook","labels_url":"https://api.github.com/repos/jaredhanson/passport-facebook/issues/187/labels{/name}","comments_url":"https://api.github.com/repos/jaredhanson/passport-facebook/issues/187/comments","events_url":"https://api.github.com/repos/jaredhanson/passport-facebook/issues/187/events","html_url":"https://github.com/jaredhanson/passport-facebook/issues/187","id":193042133,"number":187,"title":"Syntax for Sails for Facebook Authentication","user":{"login":"jadslim313","id":12466304,"avatar_url":"https://avatars.githubusercontent.com/u/12466304?v=3","gravatar_id":"","url":"https://api.github.com/users/jadslim313","html_url":"https://github.com/jadslim313","followers_url":"https://api.github.com/users/jadslim313/followers","following_url":"https://api.github.com/users/jadslim313/following{/other_user}","gists_url":"https://api.github.com/users/jadslim313/gists{/gist_id}","starred_url":"https://api.github.com/users/jadslim313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jadslim313/subscriptions","organizations_url":"https://api.github.com/users/jadslim313/orgs","repos_url":"https://api.github.com/users/jadslim313/repos","events_url":"https://api.github.com/users/jadslim313/events{/privacy}","received_events_url":"https://api.github.com/users/jadslim313/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-02T06:14:03Z","updated_at":"2016-12-02T06:14:03Z","closed_at":null,"body":"I used the sails framework to authenticate a user with my custom facebook token strategy. It works perfectly. I copied this snippet of code from github to make it work, However, I don't quite understand the syntax of that last part which has (req, res); at the end. Obviously it's referring to request and response, but why is that line of code there, it seems to be in an awkward place. Authentication fails if I exclude that line of code. It must be important so I just need to figure out what it is doing .\r\n\r\nmodule.exports = {\r\n facebook: function(req, res) {\r\npassport.authenticate('facebook-token', function(error, user, info) {\r\n  // do stuff with user\r\n  res.ok();\r\n})\r\n (req, res);\r\n }\r\n};"}}
{"actor":{"display_login":"jadslim313"}}