move tokens.ID_ into oidcClients.ID_

This commit is contained in:
Girish Ramakrishnan
2025-06-11 22:53:29 +02:00
parent 00da650524
commit d112d6308c
11 changed files with 48 additions and 42 deletions

View File

@@ -22,6 +22,7 @@ const appstore = require('./appstore.js'),
mail = require('./mail.js'),
mailServer = require('./mailserver.js'),
network = require('./network.js'),
oidcClients = require('./oidcclients.js'),
platform = require('./platform.js'),
reverseProxy = require('./reverseproxy.js'),
safe = require('safetydance'),
@@ -155,7 +156,7 @@ async function activate(username, password, email, displayName, ip, auditSource)
if (error && error.reason === BoxError.ALREADY_EXISTS) throw new BoxError(BoxError.CONFLICT, 'Already activated');
if (error) throw error;
const token = { clientId: tokens.ID_WEBADMIN, identifier: ownerId, allowedIpRanges: '', expires: Date.now() + constants.DEFAULT_TOKEN_EXPIRATION_MSECS };
const token = { clientId: oidcClients.ID_WEBADMIN, identifier: ownerId, allowedIpRanges: '', expires: Date.now() + constants.DEFAULT_TOKEN_EXPIRATION_MSECS };
const result = await tokens.add(token);
await eventlog.add(eventlog.ACTION_ACTIVATE, auditSource, {});