From d8b629a66d48eb90923bf2f88f9c2a76547217e5 Mon Sep 17 00:00:00 2001 From: derrod Date: Fri, 24 Apr 2020 06:37:40 +0200 Subject: [PATCH] [cli] Simplify manual login procedure --- legendary/cli.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/legendary/cli.py b/legendary/cli.py index 0d2f43e..9e41b36 100644 --- a/legendary/cli.py +++ b/legendary/cli.py @@ -133,16 +133,12 @@ def main(): # unfortunately the captcha stuff makes a complete CLI login flow kinda impossible right now... print('Please login via the epic web login!') - webbrowser.open('https://www.epicgames.com/id/login') + webbrowser.open('https://www.epicgames.com/id/login?redirectUrl=https%3A%2F%2Fwww.epicgames.com%2Fid%2Fapi%2Fexchange') print('If web page did not open automatically, please navigate ' 'to https://www.epicgames.com/id/login in your web browser') - _ = input('Once you\'re logged in press [Enter] to continue.') - - # after logging in we need the user to copy a code from a JSON response, less than ideal :/ - webbrowser.open('https://www.epicgames.com/id/api/exchange') - print('If second web page did not open automatically, please navigate ' - 'to https://www.epicgames.com/id/api/exchange in your web browser') - exchange_code = input('Please enter code from response: ') + print('- In case you opened the link manually; please now navigate to ' + 'https://www.epicgames.com/id/api/exchange in your web browser.') + exchange_code = input('Please enter code from JSON response: ') exchange_token = exchange_code.strip().strip('"') if core.auth_code(exchange_token):