diff --git a/src/routes/oidcclients.js b/src/routes/oidcclients.js index 98590b656..0acac4677 100644 --- a/src/routes/oidcclients.js +++ b/src/routes/oidcclients.js @@ -86,7 +86,9 @@ async function list(req, res, next) { const [error, result] = await safe(oidcClients.list()); if (error) return next(BoxError.toHttpError(error)); - next(new HttpSuccess(200, { clients: result.filter(client => !client.appId) })); + const clients = result.filter(client => !client.appId); // filter out oidc and proxyauth addon clients + + next(new HttpSuccess(200, { clients })); } async function del(req, res, next) { diff --git a/src/services.js b/src/services.js index 2ef9498bf..34c534f8f 100644 --- a/src/services.js +++ b/src/services.js @@ -1828,8 +1828,7 @@ async function setupProxyAuth(app, options) { debug('Creating OpenID client for proxyAuth'); // openid client_id is appId for now - const [error, result] = await safe(oidcClients.get(app.id)); - if (error) throw error; + const result = await oidcClients.get(app.id); // ensure we keep the secret const data = { @@ -2144,7 +2143,7 @@ async function setupOidc(app, options) { if (!app.sso) return; - debug('Setting up OpenID connect'); + debug('Setting up OIDC'); // openid client_id is appId for now const [error, result] = await safe(oidcClients.get(app.id)); @@ -2169,7 +2168,7 @@ async function teardownOidc(app, options) { assert.strictEqual(typeof app, 'object'); assert.strictEqual(typeof options, 'object'); - debug('Tearing down OpenID connect'); + debug('Tearing down OIDC'); const [error] = await safe(oidcClients.del(app.id)); if (error && error.reason !== BoxError.NOT_FOUND) throw error;