Skip to content

Commit

Permalink
updated facebook middleware to accept all startegy and routes as conf…
Browse files Browse the repository at this point in the history
…ig values
  • Loading branch information
wijskinner committed May 23, 2013
1 parent 784e12a commit 33cefca
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions lib/middleware.js
Expand Up @@ -544,10 +544,7 @@ exports.facebook = function(config,nextApp) {
var facebook_strategy = {
authorizationURL: 'https://www.facebook.com/dialog/oauth',
tokenURL: 'https://graph.facebook.com/oauth/access_token',
resourceURL: 'https://graph.facebook.com/me',
clientId: config.clientId,
clientSecret: config.clientSecret,
host: config.host,
resourceURL: 'https://graph.facebook.com/me',
parse: function(body) {
if (body){
o = JSON.parse(body);
Expand All @@ -573,7 +570,9 @@ exports.facebook = function(config,nextApp) {
}
};

return exports.oauth2(facebook_strategy, nextApp);
var oauth2Options = _.extend(facebook_strategy, config);

return exports.oauth2(oauth2Options, nextApp);
}

exports.session = exports.Session = require("./session/session").Session;
Expand Down

0 comments on commit 33cefca

Please sign in to comment.