@@ -60,11 +60,10 @@ export class MicrosoftEntraId {
6060 }
6161 const request = createOAuth2Request ( this . tokenEndpoint , body ) ;
6262 if ( this . clientSecret !== null ) {
63- const encodedCredentials = encodeBasicCredentials ( this . clientId , this . clientId ) ;
63+ const encodedCredentials = encodeBasicCredentials ( this . clientId , this . clientSecret ) ;
6464 request . headers . set ( "Authorization" , `Basic ${ encodedCredentials } ` ) ;
6565 } else {
66- // Origin header required for public clients. Must not be defined for confidential clients.
67- // Value can be anything.
66+ // Origin header required for public clients. Value can be anything.
6867 request . headers . set ( "Origin" , "arctic" ) ;
6968 }
7069 const tokens = await sendTokenRequest ( request ) ;
@@ -86,8 +85,7 @@ export class MicrosoftEntraId {
8685 const encodedCredentials = encodeBasicCredentials ( this . clientId , this . clientSecret ) ;
8786 request . headers . set ( "Authorization" , `Basic ${ encodedCredentials } ` ) ;
8887 } else {
89- // Origin header required for public clients. Must not be defined for confidential clients.
90- // Value can be anything.
88+ // Origin header required for public clients. Value can be anything.
9189 request . headers . set ( "Origin" , "arctic" ) ;
9290 }
9391 const tokens = await sendTokenRequest ( request ) ;
0 commit comments