Skip to content

Commit

Permalink
Step 17.3: Configure oauth services using service-configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
darkbasic committed Jun 15, 2017
1 parent 71195af commit 14e6fb7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions api/server/main.ts
@@ -1,9 +1,21 @@
import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
declare const ServiceConfiguration: any;

Meteor.startup(() => {
if (Meteor.settings) {
Object.assign(Accounts._options, Meteor.settings['accounts-phone']);
SMS.twilio = Meteor.settings['twilio'];
}

// Configuring oAuth services
const services = Meteor.settings.private.oAuth;

if (services) {
for (let service in services) {
ServiceConfiguration.configurations.upsert({service: service}, {
$set: services[service]
});
}
}
});

0 comments on commit 14e6fb7

Please sign in to comment.