From 9dbc7ec2eedd23387ce87e472a9c80e44c327ead Mon Sep 17 00:00:00 2001 From: KT_NG3 <84909754+KTNG-3@users.noreply.github.com> Date: Fri, 19 Apr 2024 12:32:13 +0700 Subject: [PATCH] disable multi-factor authentication --- README.md | 5 ----- package.json | 10 +++++----- packages/@valapi/auth/README.md | 8 -------- packages/@valapi/auth/package.json | 2 +- packages/@valapi/auth/src/client/AuthClient.ts | 1 + packages/@valapi/auth/src/service/Multifactor.ts | 1 + packages/valorant.ts/README.md | 11 ++--------- packages/valorant.ts/package.json | 2 +- tsconfig.test.json | 4 ++-- 9 files changed, 13 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index f4e6e76..bc10e2d 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,6 @@ VAL_REGION="na" VAL_USER="RiotUsername" VAL_PASS="Passowrd" -# multi-factor must be "enable" -VAL_MFA_REGION="ap" -VAL_MFA_USER="RiotUsername" -VAL_MFA_PASS="Password" - # https://developer.riotgames.com VAL_RIOT_API="API_KEY_123" ``` diff --git a/package.json b/package.json index d6715a3..3b42e92 100644 --- a/package.json +++ b/package.json @@ -17,16 +17,16 @@ "license": "MIT", "devDependencies": { "@types/jest": "^29.5.12", - "@types/node": "^20.12.2", - "@typescript-eslint/eslint-plugin": "^7.5.0", - "@typescript-eslint/parser": "^7.5.0", + "@types/node": "^20.12.7", + "@typescript-eslint/eslint-plugin": "^7.7.0", + "@typescript-eslint/parser": "^7.7.0", "dotenv": "^16.4.5", "eslint": "^8.57.0", "jest": "29.7.0", "rimraf": "^5.0.5", "ts-jest": "^29.1.2", - "typedoc": "^0.25.12", - "typescript": "^5.4.3" + "typedoc": "^0.25.13", + "typescript": "^5.4.5" }, "scripts": { "test": "jest --detectOpenHandles", diff --git a/packages/@valapi/auth/README.md b/packages/@valapi/auth/README.md index b7ed16f..c4e2204 100644 --- a/packages/@valapi/auth/README.md +++ b/packages/@valapi/auth/README.md @@ -71,14 +71,6 @@ const authClient = new AuthClient(); await authClient.login("BestUsername", "SuperSecretPassword"); ``` -```typescript -if (client.authenticationInfo.isMultifactor) { - const verificationCode = 428793; - - await authClient.verify(verificationCode); -} -``` - **Subject** (PlayerUUID) ```typescript diff --git a/packages/@valapi/auth/package.json b/packages/@valapi/auth/package.json index bb6c769..778553e 100644 --- a/packages/@valapi/auth/package.json +++ b/packages/@valapi/auth/package.json @@ -30,7 +30,7 @@ "homepage": "https://github.com/valapi/node-valapi/tree/master/packages/@valapi/auth#readme", "dependencies": { "@valapi/lib": "^4.0.0", - "http-cookie-agent": "^6.0.1", + "http-cookie-agent": "^6.0.3", "tough-cookie": "^4.1.3" }, "devDependencies": { diff --git a/packages/@valapi/auth/src/client/AuthClient.ts b/packages/@valapi/auth/src/client/AuthClient.ts index b9f34af..9e02d5b 100644 --- a/packages/@valapi/auth/src/client/AuthClient.ts +++ b/packages/@valapi/auth/src/client/AuthClient.ts @@ -40,6 +40,7 @@ export class AuthClient extends AuthCore { /** * Multi-Factor Authentication + * @deprecated Please, Contact us if you find out how its works * @param {number} verificationCode Verification Code * @returns {Promise} */ diff --git a/packages/@valapi/auth/src/service/Multifactor.ts b/packages/@valapi/auth/src/service/Multifactor.ts index 92ded26..55ea4c6 100644 --- a/packages/@valapi/auth/src/service/Multifactor.ts +++ b/packages/@valapi/auth/src/service/Multifactor.ts @@ -5,6 +5,7 @@ import type { AuthCore } from "../client/AuthCore"; export class Multifactor extends AuthService { /** + * @deprecated Please, Contact us if you find out how its works * @param {number} verificationCode Verification Code * @returns {Promise} */ diff --git a/packages/valorant.ts/README.md b/packages/valorant.ts/README.md index 38e1e93..909b296 100644 --- a/packages/valorant.ts/README.md +++ b/packages/valorant.ts/README.md @@ -15,7 +15,7 @@
-# Valorant API - Support Multifactor +# Valorant API [![Profile][githubrepo_image]][github_url] @@ -39,7 +39,6 @@ NodeJS package that make more easier to use Valorant API ## Why Valorant.ts ? -- Support **Two-Factor Authentication** - All-In-One - Authentication - API @@ -82,12 +81,6 @@ Authentication await AuthClient.login("BestUsername", "SuperSecretPassword"); ``` -Two-Factor Authentication - -```javascript -await AuthClient.verify(428793 /* <--- Verification Code */); -``` - Daily Offers ```javascript @@ -113,7 +106,7 @@ async function getOffersOf(ItemsId: string) { }; } -const todayStore = await WebClient.Store.getStorefront(WebClient.getSubject()); +const todayStore = await WebClient.Store.StoreFront.get(WebClient.getSubject()); for (const ItemID of todayStore.data.SkinsPanelLayout.SingleItemOffers) { console.log(await getOffersOf(ItemID)); diff --git a/packages/valorant.ts/package.json b/packages/valorant.ts/package.json index 1bed643..0df1f97 100644 --- a/packages/valorant.ts/package.json +++ b/packages/valorant.ts/package.json @@ -5,7 +5,7 @@ "registry": "https://registry.npmjs.org", "access": "public" }, - "description": "Valorant Api - Support Multifactor", + "description": "Valorant API", "keywords": [ "riot", "api", diff --git a/tsconfig.test.json b/tsconfig.test.json index 0d5a041..c79bcb1 100644 --- a/tsconfig.test.json +++ b/tsconfig.test.json @@ -1,8 +1,8 @@ { "compilerOptions": { "composite": true, - "target": "es2023", - "lib": [ "es2023", "es2022.error", "es2021.promise" ], + "target": "es2022", + "lib": [ "es2022", "es2022.error", "es2021.promise" ], "module": "commonjs", "moduleResolution": "node", "resolveJsonModule": true,