Skip to content

Commit

Permalink
Prevent others from mismatching their authentication token with the c…
Browse files Browse the repository at this point in the history
…urrent, different client ID
  • Loading branch information
DevilXD committed Dec 24, 2022
1 parent 3892dfe commit 348d039
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions twitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,8 @@ async def _validate(self):
break
else:
raise RuntimeError("Login verification failure")
if validate_response["client_id"] != CLIENT_ID:
raise MinerException("You're using an old cookie file, please generate a new one.")
self.user_id = int(validate_response["user_id"])
cookie["persistent"] = str(self.user_id)
logger.info(f"Login successful, user ID: {self.user_id}")
Expand Down

0 comments on commit 348d039

Please sign in to comment.