mirror of
https://github.com/wekan/wekan.git
synced 2026-02-13 03:34:20 +01:00
Fix Scope parsing Issue for OAuth2 Login
This commit is contained in:
parent
d83cb75f95
commit
892ee60527
9 changed files with 11 additions and 12 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue