From 4282988989429010ec8b23012ce0439f27ce4f28 Mon Sep 17 00:00:00 2001 From: Giorgio <20621396+giorgi-o@users.noreply.github.com> Date: Sun, 11 Feb 2024 19:59:22 +0000 Subject: [PATCH] print error to console if no RSO token received Fixes #94 (kinda) --- valorant/auth.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/valorant/auth.js b/valorant/auth.js index 3efcb406..5cd17b1b 100644 --- a/valorant/auth.js +++ b/valorant/auth.js @@ -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,