summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/wekan-oidc/oidc_client.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/wekan-oidc/oidc_client.js b/packages/wekan-oidc/oidc_client.js
index 744bd841..6da9d9f0 100644
--- a/packages/wekan-oidc/oidc_client.js
+++ b/packages/wekan-oidc/oidc_client.js
@@ -18,10 +18,9 @@ Oidc.requestCredential = function (options, credentialRequestCompleteCallback) {
new ServiceConfiguration.ConfigError('Service oidc not configured.'));
return;
}
-
+
var credentialToken = Random.secret();
var loginStyle = OAuth._loginStyle('oidc', config, options);
- var scope = config.requestPermissions || ['openid', 'profile', 'email'];
// options
options = options || {};
@@ -29,7 +28,7 @@ Oidc.requestCredential = function (options, credentialRequestCompleteCallback) {
options.response_type = options.response_type || 'code';
options.redirect_uri = OAuth._redirectUri('oidc', config);
options.state = OAuth._stateParam(loginStyle, credentialToken, options.redirectUrl);
- options.scope = scope.join(' ');
+ options.scope = config.requestPermissions || 'openid profile email';
if (config.loginStyle && config.loginStyle == 'popup') {
options.display = 'popup';