From c3ede70e55d8f50f836607c4c9b60155425e86a6 Mon Sep 17 00:00:00 2001 From: tehkillerbee Date: Thu, 29 Feb 2024 23:44:34 +0100 Subject: [PATCH] Make sure is_pkce state is set when pkce_login_url() is used directly --- tidalapi/session.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tidalapi/session.py b/tidalapi/session.py index fa854d6..70aeb8c 100644 --- a/tidalapi/session.py +++ b/tidalapi/session.py @@ -500,8 +500,6 @@ def login_pkce(self, fn_print: Callable[[str], None] = print) -> None: # Parse and set tokens. self.process_auth_token(json) - self.is_pkce = True - # Swap the client_id and secret # self.client_enable_hires() @@ -670,6 +668,7 @@ def process_auth_token(self, json: dict[str, Union[str, int]]) -> None: self.session_id = json["sessionId"] self.country_code = json["countryCode"] self.user = user.User(self, user_id=json["userId"]).factory() + self.is_pkce = True def _wait_for_link_login(self, json: JsonObj) -> Any: expiry = float(json["expiresIn"])