mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-31 18:44:27 +02:00
Ignore empty PLATFORMIO_AUTH_TOKEN
This commit is contained in:
@@ -228,8 +228,8 @@ class AccountClient(RESTClient): # pylint:disable=too-many-public-methods
|
|||||||
return response
|
return response
|
||||||
|
|
||||||
def fetch_authentication_token(self):
|
def fetch_authentication_token(self):
|
||||||
if "PLATFORMIO_AUTH_TOKEN" in os.environ:
|
if os.environ.get("PLATFORMIO_AUTH_TOKEN"):
|
||||||
return os.environ["PLATFORMIO_AUTH_TOKEN"]
|
return os.environ.get("PLATFORMIO_AUTH_TOKEN")
|
||||||
auth = app.get_state_item("account", {}).get("auth", {})
|
auth = app.get_state_item("account", {}).get("auth", {})
|
||||||
if auth.get("access_token") and auth.get("access_token_expire"):
|
if auth.get("access_token") and auth.get("access_token_expire"):
|
||||||
if auth.get("access_token_expire") > time.time():
|
if auth.get("access_token_expire") > time.time():
|
||||||
|
Reference in New Issue
Block a user