Skip to content

Commit

Permalink
Merge pull request #29 from SpatzlHD/auth-403-fix
Browse files Browse the repository at this point in the history
Fixed 403/1020 Cloudflare Error response code
  • Loading branch information
liamcottle authored Oct 2, 2022
2 parents 07efc6c + 832a3c1 commit 23560f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ class API {
this.user_id = null;
this.access_token = null;
this.entitlements_token = null;
this.user_agent = "RiotClient/43.0.1.4195386.4190634 rso-auth (Windows; 10;;Professional, x64)";
this.client_version = "release-05.00-shipping-6-725355";
this.user_agent = "RiotClient/58.0.0.4640299.4552318 rso-auth (Windows;10;;Professional, x64)";
this.client_version = "release-05.06-shipping-6-765767";
this.client_platform = {
platformType: "PC",
platformOS: "Windows",
Expand Down Expand Up @@ -104,15 +104,15 @@ class API {
},
{
headers: {
"Cookie": cookie,
Cookie: cookie,
"User-Agent": this.user_agent,
},
httpsAgent: agent,
}
);

// throw exception for auth_failure
if(access_tokens.data?.error === 'auth_failure'){
if (access_tokens.data?.error === "auth_failure") {
throw new Error("auth_failure: username or password is incorrect.");
}

Expand Down

0 comments on commit 23560f1

Please sign in to comment.