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:
+3
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user