Skip to content

Commit

Permalink
Release v3.1.3 (#252)
Browse files Browse the repository at this point in the history
Co-authored-by: Hurby <[email protected]>
Co-authored-by: Marvin <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2025
1 parent 7b2a7fe commit 339e853
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions .RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix TikTok endpoints and `scope` parameter.
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.1.2",
"version": "3.1.3",
"description": "OAuth 2.0 clients for popular providers",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions src/providers/tiktok.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { createOAuth2Request, sendTokenRequest, sendTokenRevocationRequest } fro
import type { OAuth2Tokens } from "../oauth2.js";

const authorizationEndpoint = "https://www.tiktok.com/v2/auth/authorize";
const tokenEndpoint = "https://open.tiktokapis.com/v2/oauth/token";
const tokenRevocationEndpoint = "https://open.tiktokapis.com/v2/oauth/revoke";
const tokenEndpoint = "https://open.tiktokapis.com/v2/oauth/token/";
const tokenRevocationEndpoint = "https://open.tiktokapis.com/v2/oauth/revoke/";

export class TikTok {
private clientKey: string;
Expand All @@ -27,7 +27,7 @@ export class TikTok {
url.searchParams.set("code_challenge_method", "S256");
url.searchParams.set("code_challenge", codeChallenge);
if (scopes.length > 0) {
url.searchParams.set("scope", scopes.join(" "));
url.searchParams.set("scope", scopes.join(","));
}
url.searchParams.set("redirect_uri", this.redirectURI);
return url;
Expand Down

0 comments on commit 339e853

Please sign in to comment.