oidc: some comments

This commit is contained in:
Girish Ramakrishnan
2025-06-12 22:58:29 +02:00
parent b61b45177a
commit f0c5b603ee
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ async function add(data) {
assert.strictEqual(typeof data.appId, 'string'); assert.strictEqual(typeof data.appId, 'string');
assert(data.tokenSignatureAlgorithm === 'RS256' || data.tokenSignatureAlgorithm === 'EdDSA'); assert(data.tokenSignatureAlgorithm === 'RS256' || data.tokenSignatureAlgorithm === 'EdDSA');
const id = data.id || 'cid-' + hat(128); const id = data.id || 'cid-' + hat(128); // oidc addon provides the id for apps as app.id
const secret = hat(256); const secret = hat(256);
const query = `INSERT INTO ${OIDC_CLIENTS_TABLE_NAME} (id, secret, name, appId, loginRedirectUri, tokenSignatureAlgorithm) VALUES (?, ?, ?, ?, ?, ?)`; const query = `INSERT INTO ${OIDC_CLIENTS_TABLE_NAME} (id, secret, name, appId, loginRedirectUri, tokenSignatureAlgorithm) VALUES (?, ?, ?, ?, ?, ?)`;
+1 -1
View File
@@ -457,7 +457,7 @@ async function interactionConfirm(req, res, next) {
const user = await users.get(accountId); const user = await users.get(accountId);
if (!user) return next(new Error('User not found')); if (!user) return next(new Error('User not found'));
user.ghost = lastSubmission ? lastSubmission.ghost : false; // restore ghost flag user.ghost = !!lastSubmission?.ghost; // restore ghost flag. lastSubmission can be empty if login interaction was skipped (already logged in)
// Check if user has access to the app if client refers to an app // Check if user has access to the app if client refers to an app
if (client.appId) { if (client.appId) {