diff --git a/packages/core/src/oidc-utils.ts b/packages/core/src/oidc-utils.ts index 68d3a370..e33da5f1 100644 --- a/packages/core/src/oidc-utils.ts +++ b/packages/core/src/oidc-utils.ts @@ -68,7 +68,8 @@ export class OidcClient { // New ID Token is requested from action service let id_token_url: string = OidcClient.getIDTokenUrl() if (audience) { - id_token_url = `${id_token_url}&audience=${encodeURIComponent(audience)}` + const encodedAudience = encodeURIComponent(audience) + id_token_url = `${id_token_url}&audience=${encodedAudience}` } debug(`ID token url is ${id_token_url}`)