From 79362c81e592c825d66a8484374d7ebb8690f6a3 Mon Sep 17 00:00:00 2001 From: James Cleverley-Prance Date: Thu, 29 May 2025 15:06:24 +0100 Subject: [PATCH] fix: oauth2 audience not sent (#10) --- plugins/auth-oauth2/src/getAccessToken.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/auth-oauth2/src/getAccessToken.ts b/plugins/auth-oauth2/src/getAccessToken.ts index 1129508a..5651c8cb 100644 --- a/plugins/auth-oauth2/src/getAccessToken.ts +++ b/plugins/auth-oauth2/src/getAccessToken.ts @@ -41,7 +41,7 @@ export async function getAccessToken( }; if (scope) httpRequest.body!.form.push({ name: 'scope', value: scope }); - if (scope) httpRequest.body!.form.push({ name: 'audience', value: audience }); + if (audience) httpRequest.body!.form.push({ name: 'audience', value: audience }); if (credentialsInBody) { httpRequest.body!.form.push({ name: 'client_id', value: clientId });