Skip to content

Commit f92fffe

Browse files
Kieunmrin9
authored andcommitted
Fix incorrect credentials handling for client_credentials grant type
Fixes #869
1 parent ba7bcb2 commit f92fffe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/templates/security-scheme-template.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ async function fetchAccessToken(tokenUrl, clientId, clientSecret, redirectUrl, g
105105
urlFormParams.append('code_verifier', codeVerifier); // for PKCE
106106
}
107107
if (sendClientSecretIn === 'header') {
108-
// headers.set('Authorization', `Basic ${btoa(`${clientId}:${clientSecret}`)}`);
109-
headers.set('Authorization', `Basic ${Buffer.from(`${username}:${password}`, 'utf8').toString('base64')}`);
108+
headers.set('Authorization', `Basic ${Buffer.from(`${clientId}:${clientSecret}`, 'utf8').toString('base64')}`);
110109
} else {
111110
urlFormParams.append('client_id', clientId);
112111
urlFormParams.append('client_secret', clientSecret);

0 commit comments

Comments
 (0)