Optionally take id from data when adding an oidcClient

clients for apps use the app.id as the client id
This commit is contained in:
Johannes Zellner
2025-06-12 22:05:59 +02:00
parent 155a348802
commit afd19a7307
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -2147,6 +2147,7 @@ async function setupOidc(app, options) {
// ensure we keep the secret
const data = {
id: app.id,
secret: result ? result.secret : hat(4 * 128),
loginRedirectUri: options.loginRedirectUri || '',
logoutRedirectUri: options.logoutRedirectUri || '',
@@ -2155,8 +2156,8 @@ async function setupOidc(app, options) {
appId: app.id
};
if (result) await oidcClients.update(app.id, data);
else await oidcClients.add(app.id, data);
if (result) await oidcClients.update(data.id, data);
else await oidcClients.add(data);
}
async function teardownOidc(app, options) {