Permalink
Browse files

Step 17.3: Configure oauth services using service-configuration

  • Loading branch information...
darkbasic committed Jun 9, 2017
1 parent 71195af commit 14e6fb7dcf37424d7ec2829b868d820b80f0a633
Showing with 12 additions and 0 deletions.
  1. +12 −0 api/server/main.ts
View
@@ -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.