1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-19 13:19:44 +02:00

fix: Lazy initialize OIDC client

This commit is contained in:
Disyer 2024-11-18 10:03:05 +02:00
parent 96956e1268
commit 88ffa08512
4 changed files with 58 additions and 23 deletions

View file

@ -12,6 +12,7 @@ module.exports = {
exits: {
invalidCodeOrNonce: {},
invalidOIDCConfiguration: {},
invalidUserinfoConfiguration: {},
missingValues: {},
emailAlreadyInUse: {},
@ -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 {