1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00
planka/server/api/controllers/show-config.js

23 lines
495 B
JavaScript
Raw Normal View History

2023-10-17 19:18:19 +02:00
module.exports = {
fn() {
2023-10-19 16:05:34 +02:00
let oidc = null;
if (sails.hooks.oidc.isActive()) {
const oidcClient = sails.hooks.oidc.getClient();
oidc = {
authorizationUrl: oidcClient.authorizationUrl({
scope: sails.config.custom.oidcScopes,
response_mode: 'fragment',
}),
endSessionUrl: oidcClient.issuer.end_session_endpoint ? oidcClient.endSessionUrl({}) : null,
};
}
2023-10-17 19:18:19 +02:00
return {
item: {
2023-10-19 16:05:34 +02:00
oidc,
2023-10-17 19:18:19 +02:00
},
};
},
};