Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.2.3 #271

Merged
merged 27 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
fb5c8e8
Add Battle.net provider (#241)
hurby24 Jan 6, 2025
8261737
3.1.0
pilcrowonpaper Jan 6, 2025
5657567
Merge branch 'main' into next
pilcrowonpaper Jan 9, 2025
e1783a9
Fix Authentik endpoints (#245)
pilcrowonpaper Jan 9, 2025
8f846a3
v3.1.1
pilcrowonpaper Jan 9, 2025
fa5af8d
fix: export TikTok provider (#249)
m4rvr Jan 14, 2025
914163a
v3.1.2
pilcrowonpaper Jan 14, 2025
a1f38dc
merge
pilcrowonpaper Jan 14, 2025
23a9cfc
format
pilcrowonpaper Jan 14, 2025
04360b5
Merge branch 'main' into next
pilcrowonpaper Jan 14, 2025
d64c385
fix: tiktok provider (#251)
m4rvr Jan 15, 2025
d4b1ded
v3.1.3
pilcrowonpaper Jan 15, 2025
868b63d
Add synology provider (#248)
mastermakrela Jan 20, 2025
b3d5015
Merge remote-tracking branch 'refs/remotes/origin/next' into next
pilcrowonpaper Jan 20, 2025
719d5f3
v3.2.0
pilcrowonpaper Jan 20, 2025
7235aa5
Add `refreshAccessToken()` to Figma provider (#258)
pilcrowonpaper Jan 22, 2025
b7fcf52
v3.2.1
pilcrowonpaper Jan 22, 2025
80f6112
merge
pilcrowonpaper Jan 22, 2025
716e131
Merge branch 'main' into next
pilcrowonpaper Jan 22, 2025
a8b3806
EntraID: Add Origin header to requests (#262)
pilcrowonpaper Feb 1, 2025
658fa86
v3.2.2
pilcrowonpaper Feb 1, 2025
aec50a8
merge
pilcrowonpaper Feb 1, 2025
95278b3
Merge branch 'main' into next
pilcrowonpaper Feb 1, 2025
2da5f89
Merge branch 'main' into next
pilcrowonpaper Feb 1, 2025
cb17b40
Update Figma endpoint (#267)
pilcrowonpaper Feb 5, 2025
10193e7
Entra ID: Remove `Origin` header for confidential clients (#270)
pilcrowonpaper Feb 5, 2025
a7cdcae
v3.2.3
pilcrowonpaper Feb 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Figma: Update endpoints to latest ([#267](https://github.com/pilcrowonpaper/arctic/pull/267)).
- Entra ID: Remove `Origin` header for confidential clients ([#270](https://github.com/pilcrowonpaper/arctic/pull/270)).
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "arctic",
"type": "module",
"version": "3.2.2",
"version": "3.2.3",
"description": "OAuth 2.0 clients for popular providers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/providers/figma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { OAuth2Client } from "../client.js";
import type { OAuth2Tokens } from "../oauth2.js";

const authorizationEndpoint = "https://www.figma.com/oauth";
const tokenEndpoint = "https://www.figma.com/api/oauth/token";
const tokenEndpoint = "https://api.figma.com/v1/oauth/token";
const refreshEndpoint = "https://api.figma.com/v1/oauth/refresh";

export class Figma {
Expand Down
12 changes: 8 additions & 4 deletions src/providers/microsoft-entra-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@ export class MicrosoftEntraId {
body.set("client_id", this.clientId);
}
const request = createOAuth2Request(this.tokenEndpoint, body);
// Origin header required for public clients. Value can be anything.
request.headers.set("Origin", "arctic");
if (this.clientSecret !== null) {
const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientId);
request.headers.set("Authorization", `Basic ${encodedCredentials}`);
} else {
// Origin header required for public clients. Must not be defined for confidential clients.
// Value can be anything.
request.headers.set("Origin", "arctic");
}
const tokens = await sendTokenRequest(request);
return tokens;
Expand All @@ -80,11 +82,13 @@ export class MicrosoftEntraId {
body.set("scope", scopes.join(" "));
}
const request = createOAuth2Request(this.tokenEndpoint, body);
// Origin header required for public clients. Value can be anything.
request.headers.set("Origin", "arctic");
if (this.clientSecret !== null) {
const encodedCredentials = encodeBasicCredentials(this.clientId, this.clientSecret);
request.headers.set("Authorization", `Basic ${encodedCredentials}`);
} else {
// Origin header required for public clients. Must not be defined for confidential clients.
// Value can be anything.
request.headers.set("Origin", "arctic");
}
const tokens = await sendTokenRequest(request);
return tokens;
Expand Down