Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
socialProviders() should only return enabled providers
Browse files Browse the repository at this point in the history
  • Loading branch information
timothyej committed Feb 24, 2016
1 parent 487c576 commit e9b1e53
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/controllers/social-providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ module.exports = function socialProviders(req, res) {
var socialProviders = socialProviderNames.reduce(function (memo, providerName) {
var provider = config.web.social[providerName];

memo[providerName] = {
enabled: provider.enabled,
callbackUri: provider.uri,
clientId: provider.clientId
};
if (provider.enabled) {
memo[providerName] = {
enabled: provider.enabled,
callbackUri: provider.uri,
clientId: provider.clientId
};
}

return memo;
}, {});
Expand Down

0 comments on commit e9b1e53

Please sign in to comment.