diff --git a/src/oidc.js b/src/oidc.js index 78c99eecc..a805c488d 100644 --- a/src/oidc.js +++ b/src/oidc.js @@ -143,7 +143,7 @@ function load(modelName) { if (DATA_STORE[modelName]) return; const filePath = path.join(paths.OIDC_STORE_DIR, `${modelName}.json`); - debug(`load: model ${modelName} based on ${filePath}.`); + // debug(`load: model ${modelName} based on ${filePath}.`); let data = {}; try { @@ -162,7 +162,7 @@ function save(modelName) { if (!DATA_STORE[modelName]) return; const filePath = path.join(paths.OIDC_STORE_DIR, `${modelName}.json`); - debug(`save: model ${modelName} to ${filePath}.`); + // debug(`save: model ${modelName} to ${filePath}.`); try { fs.writeFileSync(filePath, JSON.stringify(DATA_STORE[modelName], null, 2), 'utf8'); @@ -212,7 +212,7 @@ class CloudronAdapter { constructor(name) { this.name = name; - debug(`Creating OpenID storage adapter for ${name}`); + // debug(`Creating OpenID storage adapter for ${name}`); if (this.name === 'Client') { return; @@ -389,7 +389,7 @@ class CloudronAdapter { * */ async destroy(id) { - debug(`[${this.name}] destroy: ${id}`); + // debug(`[${this.name}] destroy: ${id}`); if (this.name === 'Client') { debug('destroy: this should not happen as it is stored in our db'); @@ -534,7 +534,7 @@ function interactionLogin(provider) { await eventlog.add(user.ghost ? eventlog.ACTION_USER_LOGIN_GHOST : eventlog.ACTION_USER_LOGIN, auditSource, { userId: user.id, user: users.removePrivateFields(user) }); if (!user.ghost) safe(users.notifyLoginLocation(user, ip, userAgent, auditSource), { debug }); - debug(`route interaction login post result redirectTo:${redirectTo}`); + // debug(`route interaction login post result redirectTo:${redirectTo}`); res.status(200).send({ redirectTo }); }; @@ -634,7 +634,7 @@ function interactionAbort(provider) { * loading some claims from external resources etc. based on this detail * or not return them in id tokens but only userinfo and so on. */ -async function claims(userId, use, scope) { +async function claims(userId/*, use, scope*/) { const [error, user] = await safe(users.get(userId)); if (error) return { error: 'user not found' }; @@ -755,7 +755,7 @@ async function start() { || ctx.oidc.session.grantIdFor(ctx.oidc.client.clientId); if (grantId) { - return await ctx.oidc.provider.Grant.find(grantId); + return await ctx.oidc.provider.Grant.find(grantId); } else if (ctx.oidc.client.clientId === DASHBOARD_CLIENT_ID || ctx.oidc.client.clientId === DEV_CLIENT_ID) { const grant = new ctx.oidc.provider.Grant({ clientId: ctx.oidc.client.clientId,