diff --git a/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js b/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js index 2cf6e5d..fe8b19f 100644 --- a/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js +++ b/lib/strategy/EnrichIntegrationFromRemoteConfigStrategy.js @@ -61,8 +61,8 @@ EnrichIntegrationFromRemoteConfigStrategy.prototype._enrichWithSocialProviders = return callback(err); } - if (!config.socialProviders) { - config.socialProviders = {}; + if (!config.web.social) { + config.web.social = {}; } mappings.each(function (mapping, next) { @@ -87,14 +87,14 @@ EnrichIntegrationFromRemoteConfigStrategy.prototype._enrichWithSocialProviders = delete remoteProvider.createdAt; delete remoteProvider.updatedAt; - var localProvider = config.socialProviders[providerId]; + var localProvider = config.web.social[providerId]; if (!localProvider) { - localProvider = config.socialProviders[providerId] = {}; + localProvider = config.web.social[providerId] = {}; } - if (!localProvider.callbackUri) { - localProvider.callbackUri = '/callbacks/' + remoteProvider.providerId; + if (!localProvider.uri) { + localProvider.uri = '/callbacks/' + remoteProvider.providerId; } extend(remoteProvider, { enabled: true }); diff --git a/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js b/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js index a379a2c..13ba877 100644 --- a/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js +++ b/test/strategy/EnrichIntegrationFromRemoteConfigStrategyTest.js @@ -194,7 +194,7 @@ describe('EnrichIntegrationFromRemoteConfigStrategy', function () { }); }); - it('should set the socialProviders property on the configuration', function (done) { + it('should set the web.social property on the configuration', function (done) { var mockOAuthPolicy = {}; var mockAccountStoreMappings = new Collection({ size: 1 }); var mockApplication = makeMockApplication(mockOAuthPolicy, mockAccountStoreMappings); @@ -202,7 +202,7 @@ describe('EnrichIntegrationFromRemoteConfigStrategy', function () { testStrategy.process(mockConfig, function (err, result) { assert.isNull(err); - assert.isDefined(result.socialProviders); + assert.isDefined(result.web.social); done(); }); });