From b9206c7f785fb44cfbbaa61136d39fee02330b06 Mon Sep 17 00:00:00 2001 From: Dasuni Geeganage Date: Wed, 24 Jul 2024 13:35:08 +0530 Subject: [PATCH] Fix client secret dropping issue from the js-core level --- lib/src/core/authentication-core.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/core/authentication-core.ts b/lib/src/core/authentication-core.ts index 693fd88e..6b09de80 100644 --- a/lib/src/core/authentication-core.ts +++ b/lib/src/core/authentication-core.ts @@ -76,6 +76,10 @@ export class AuthenticationCore { authorizeRequestParams.set("response_type", "code"); authorizeRequestParams.set("client_id", configData.clientID); + if (configData.clientSecret && configData.clientSecret.trim().length > 0) { + authorizeRequestParams.set("client_secret", configData.clientSecret); + } + let scope: string = OIDC_SCOPE; if (configData.scope && configData.scope.length > 0) {