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:
parent
96956e1268
commit
88ffa08512
4 changed files with 58 additions and 23 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue