Skip to content

Commit

Permalink
print error to console if no RSO token received
Browse files Browse the repository at this point in the history
Fixes #94 (kinda)
  • Loading branch information
giorgi-o committed Feb 11, 2024
1 parent b050197 commit 4282988
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions valorant/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,12 @@ export const redeem2FACode = async (id, code) => {
const processAuthResponse = async (id, authData, redirect, user=null) => {
if(!user) user = new User({id});
const [rso, idt] = extractTokensFromUri(redirect);
if(rso == null) {
console.error("Riot servers didn't return an RSO token!");
console.error("Most likely the Cloudflare firewall is blocking your IP address. Try hosting on your home PC and seeing if the issue still happens.");
throw "Riot servers didn't return an RSO token!";
}

user.auth = {
...user.auth,
rso: rso,
Expand Down

0 comments on commit 4282988

Please sign in to comment.