Skip to content

Commit

Permalink
Merge pull request #14 from KyeOnDiscord/main
Browse files Browse the repository at this point in the history
Use 'verification_uri_complete' for web browser
  • Loading branch information
xMistt authored Aug 31, 2023
2 parents bffb223 + 6a35c40 commit b816034
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ async def start(self) -> None:
print("Opening device code link in a new tab.")

device_code = await self.create_device_code()
webbrowser.open(
f"https://www.epicgames.com/activate?userCode={device_code[0]}",
new=1,
)
webbrowser.open(device_code[0], new=1)

user = await self.wait_for_device_code_completion(code=device_code[1])
device_auths = await self.create_device_auths(user)
Expand Down Expand Up @@ -160,7 +157,7 @@ async def create_device_code(self) -> tuple:
) as request:
data = await request.json()

return data["user_code"], data["device_code"]
return data["verification_uri_complete"], data["device_code"]

async def wait_for_device_code_completion(self, code: str) -> EpicUser:
os.system('cls' if sys.platform.startswith('win') else 'clear')
Expand Down

0 comments on commit b816034

Please sign in to comment.