mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
wait for service config load to redirect to oidc provider
This commit is contained in:
parent
05a98fa88b
commit
ee254cb9c8
2 changed files with 45 additions and 57 deletions
|
@ -229,6 +229,12 @@ if (Meteor.isServer) {
|
|||
]);
|
||||
}
|
||||
|
||||
function loadOidcConfig(){
|
||||
config = ServiceConfiguration.configurations.findOne({service: 'oidc'});
|
||||
configKeys = Object.keys(config);
|
||||
return Object.keys(config).length > 0;
|
||||
}
|
||||
|
||||
function sendInvitationEmail(_id) {
|
||||
const icode = InvitationCodes.findOne(_id);
|
||||
const author = Users.findOne(Meteor.userId());
|
||||
|
@ -509,8 +515,8 @@ if (Meteor.isServer) {
|
|||
return process.env.PASSWORD_LOGIN_ENABLED === 'false';
|
||||
},
|
||||
isOidcRedirectionEnabled(){
|
||||
return process.env.OIDC_REDIRECTION_ENABLED === 'true';
|
||||
},
|
||||
return process.env.OIDC_REDIRECTION_ENABLED === 'true' && loadOidcConfig();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue