1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-21 22:29:42 +02:00

fix: Lazy initialize OIDC client (#947)

This commit is contained in:
Derzsi Dániel 2024-11-18 23:38:52 +02:00 committed by GitHub
parent 2109fea800
commit 480c280ab3
4 changed files with 58 additions and 23 deletions

View file

@ -11,6 +11,7 @@ module.exports = {
},
exits: {
invalidOIDCConfiguration: {},
invalidCodeOrNonce: {},
invalidUserinfoConfiguration: {},
missingValues: {},
@ -19,7 +20,13 @@ module.exports = {
},
async fn(inputs) {
const client = sails.hooks.oidc.getClient();
let client;
try {
client = await sails.hooks.oidc.getClient();
} catch (error) {
sails.log.warn(`Error while initializing OIDC client: ${error}`);
throw 'invalidOIDCConfiguration';
}
let tokenSet;
try {