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 });