This commit is contained in:
@@ -53,6 +53,8 @@ class OAuth:
|
||||
|
||||
def set_code(self, code):
|
||||
self.__code = code
|
||||
logging.info("OAuth: Callback received, attempting to connect to Spotify...")
|
||||
print("OAuth: Callback received, attempting to connect to Spotify...")
|
||||
|
||||
def request_token(self):
|
||||
if not self.__code:
|
||||
@@ -97,6 +99,8 @@ class OAuth:
|
||||
self.end_headers()
|
||||
self.wfile.write(b"Request doesn't contain 'code'")
|
||||
return
|
||||
# Store the authorization code and notify the main
|
||||
# process that the callback has been received.
|
||||
self.server.set_code(query.get("code")[0])
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
|
||||
Reference in New Issue
Block a user