summaryrefslogtreecommitdiffstats
path: root/server/authentication.js
diff options
context:
space:
mode:
Diffstat (limited to 'server/authentication.js')
-rw-r--r--server/authentication.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/server/authentication.js b/server/authentication.js
index acc101cc..03b4c464 100644
--- a/server/authentication.js
+++ b/server/authentication.js
@@ -54,5 +54,24 @@ Meteor.startup(() => {
Authentication.checkAdminOrCondition(userId, normalAccess);
};
+ if (Meteor.isServer) {
+ ServiceConfiguration.configurations.upsert(
+ { service: 'oidc' },
+ {
+ $set: {
+ loginStyle: 'redirect',
+ clientId: 'CLIENT_ID',
+ secret: 'SECRET',
+ serverUrl: 'https://my-server',
+ authorizationEndpoint: '/oauth/authorize',
+ userinfoEndpoint: '/oauth/userinfo',
+ tokenEndpoint: '/oauth/token',
+ idTokenWhitelistFields: [],
+ requestPermissions: ['openid']
+ }
+ }
+ );
+ }
+
});