mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
fix: Lazy initialize OIDC client (#947)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user