diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/auth.js | 1 | ||||
-rw-r--r-- | lib/config.js | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/auth.js b/lib/auth.js index dd6a54e3..3e129b95 100644 --- a/lib/auth.js +++ b/lib/auth.js @@ -91,6 +91,7 @@ function registerAuthMethod () { baseURL: config.gitlab.baseURL, clientID: config.gitlab.clientID, clientSecret: config.gitlab.clientSecret, + scope: config.gitlab.scope, callbackURL: config.serverurl + '/auth/gitlab/callback' }, callback)) } diff --git a/lib/config.js b/lib/config.js index 2ecb4783..674dd113 100644 --- a/lib/config.js +++ b/lib/config.js @@ -102,8 +102,9 @@ var github = ((process.env.HMD_GITHUB_CLIENTID && process.env.HMD_GITHUB_CLIENTS var gitlab = ((process.env.HMD_GITLAB_CLIENTID && process.env.HMD_GITLAB_CLIENTSECRET) || (fs.existsSync('/run/secrets/gitlab_clientID') && fs.existsSync('/run/secrets/gitlab_clientSecret'))) ? { baseURL: process.env.HMD_GITLAB_BASEURL, clientID: handleDockerSecret('gitlab_clientID') || process.env.HMD_GITLAB_CLIENTID, - clientSecret: handleDockerSecret('gitlab_clientSecret') || process.env.HMD_GITLAB_CLIENTSECRET -} : config.gitlab || false + clientSecret: handleDockerSecret('gitlab_clientSecret') || process.env.HMD_GITLAB_CLIENTSECRET, + scope: process.env.HMD_GITLAB_SCOPE +} : (config.gitlab && config.gitlab.clientID && config.gitlab.clientSecret && config.gitlab) || false var dropbox = ((process.env.HMD_DROPBOX_CLIENTID && process.env.HMD_DROPBOX_CLIENTSECRET) || (fs.existsSync('/run/secrets/dropbox_clientID') && fs.existsSync('/run/secrets/dropbox_clientSecret'))) ? { clientID: handleDockerSecret('dropbox_clientID') || process.env.HMD_DROPBOX_CLIENTID, clientSecret: handleDockerSecret('dropbox_clientSecret') || process.env.HMD_DROPBOX_CLIENTSECRET |