Skip to content

Commit

Permalink
fixed cookie can't refresh_token
Browse files Browse the repository at this point in the history
  • Loading branch information
staciax committed Jun 18, 2022
1 parent 9e5c67f commit 3852b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot.py
Expand Up @@ -36,7 +36,7 @@ class ValorantBot(commands.Bot):

def __init__(self) -> None:
super().__init__(command_prefix=BOT_PREFIX, case_insensitive=True, intents=intents)
self.bot_version = '3.2.0'
self.bot_version = '3.2.1'
self.tree.interaction_check = self.interaction_check

@staticmethod
Expand Down
4 changes: 3 additions & 1 deletion utils/valorant/auth.py
Expand Up @@ -263,11 +263,13 @@ async def redeem_cookies(self, cookies: Dict) -> Tuple[Dict[str, Any], str, str]
# cookies = json.loads(cookies)

session = ClientSession()

if 'cookie' in cookies: cookies = cookies['cookie']

async with session.get(
"https://auth.riotgames.com/authorize?redirect_uri=https%3A%2F%2Fplayvalorant.com%2Fopt_in&client_id=play-valorant-web-prod&response_type=token%20id_token&scope=account%20openid&nonce=1",
cookies=cookies,
allow_redirects=False
allow_redirects=False,
) as r:
data = await r.text()

Expand Down

0 comments on commit 3852b02

Please sign in to comment.