Skip to content

Commit

Permalink
Store OAuth global variables on initial auth
Browse files Browse the repository at this point in the history
f0e committed Jul 31, 2024
1 parent 3c4a5fe commit 0b1e118
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trakt/core.py
Original file line number Diff line number Diff line change
@@ -179,7 +179,7 @@ def oauth_auth(username, client_id=None, client_secret=None, store=False,
PIN. Default function `_terminal_oauth_pin` for terminal auth
:return: Your OAuth access token
"""
global CLIENT_ID, CLIENT_SECRET, OAUTH_TOKEN
global CLIENT_ID, CLIENT_SECRET, OAUTH_TOKEN, OAUTH_REFRESH, OAUTH_EXPIRES_AT
if client_id is None and client_secret is None:
client_id, client_secret = _get_client_info()
CLIENT_ID, CLIENT_SECRET = client_id, client_secret
@@ -259,7 +259,7 @@ def get_device_token(device_code, client_id=None, client_secret=None,
:return: Information regarding the authentication polling.
:return type: dict
"""
global CLIENT_ID, CLIENT_SECRET, OAUTH_TOKEN, OAUTH_REFRESH
global CLIENT_ID, CLIENT_SECRET, OAUTH_TOKEN, OAUTH_REFRESH, OAUTH_EXPIRES_AT
if client_id is None and client_secret is None:
client_id, client_secret = _get_client_info()
CLIENT_ID, CLIENT_SECRET = client_id, client_secret

0 comments on commit 0b1e118

Please sign in to comment.