From af795cb806a5a4381106f7b170e3d45b4f2f00f3 Mon Sep 17 00:00:00 2001 From: Arvid Fahlstrom Myrman <885076+arvidfm@users.noreply.github.com> Date: Thu, 5 Feb 2026 14:17:25 +0000 Subject: [PATCH] authenticate early with the interactive client --- flixpy/flix/cli/interactive_client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/flixpy/flix/cli/interactive_client.py b/flixpy/flix/cli/interactive_client.py index 5c82481..586ecb7 100644 --- a/flixpy/flix/cli/interactive_client.py +++ b/flixpy/flix/cli/interactive_client.py @@ -53,6 +53,11 @@ async def _sign_in(self) -> None: self.__config["access_key"] = access_key.to_json() async def request(self, *args: Any, **kwargs: Any) -> aiohttp.ClientResponse: + # try to auth ahead of time only if the username and password + # were explicitly provided + if self.access_key is None and self.__username and self.__password: + await self._sign_in() + try: return await super().request(*args, **kwargs) except errors.FlixNotVerifiedError: