summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-06-11 16:51:36 +0300
committerLauri Ojansivu <x@xet7.org>2019-06-11 16:51:36 +0300
commit406a9492fd2d211237e0128a11c45c3281d1af11 (patch)
treeeff04c651dd30c7cc0190f87ef9e316c9a723aa5
parentcd70d9d09e30796189c0b43b2af18862273e2ae0 (diff)
parentc859cd2278685d369ed2b1a5739b1327cd0d90af (diff)
downloadwekan-406a9492fd2d211237e0128a11c45c3281d1af11.tar.gz
wekan-406a9492fd2d211237e0128a11c45c3281d1af11.tar.bz2
wekan-406a9492fd2d211237e0128a11c45c3281d1af11.zip
Merge branch 'moserben16-patch-1' into devel
-rw-r--r--packages/wekan-oidc/oidc_server.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/wekan-oidc/oidc_server.js b/packages/wekan-oidc/oidc_server.js
index ec615cd1..e826d1f5 100644
--- a/packages/wekan-oidc/oidc_server.js
+++ b/packages/wekan-oidc/oidc_server.js
@@ -49,7 +49,12 @@ if (Meteor.release) {
var getToken = function (query) {
var debug = process.env.DEBUG || false;
var config = getConfiguration();
- var serverTokenEndpoint = config.serverUrl + config.tokenEndpoint;
+ if(config.tokenEndpoint.includes('https://')){
+ var serverTokenEndpoint = config.tokenEndpoint;
+ }else{
+ var serverTokenEndpoint = config.serverUrl + config.tokenEndpoint;
+ }
+ var requestPermissions = config.requestPermissions;
var response;
try {
@@ -66,6 +71,7 @@ var getToken = function (query) {
client_secret: OAuth.openSecret(config.secret),
redirect_uri: OAuth._redirectUri('oidc', config),
grant_type: 'authorization_code',
+ scope: requestPermissions,
state: query.state
}
}