Skip to content

Commit 705c0e9

Browse files
Merge pull request #273 from pilcrowonpaper/next
Release v3.2.4
2 parents 8d0592a + 1c8d1e5 commit 705c0e9

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

.RELEASE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Entra ID: Fix `Authorization` header ([#272](https://github.com/pilcrowonpaper/arctic/pull/272)).

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "arctic",
33
"type": "module",
4-
"version": "3.2.3",
4+
"version": "3.2.4",
55
"description": "OAuth 2.0 clients for popular providers",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",

src/providers/microsoft-entra-id.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)