diff --git a/g4f/Provider/Copilot.py b/g4f/Provider/Copilot.py index 1e39b25f..37453f16 100644 --- a/g4f/Provider/Copilot.py +++ b/g4f/Provider/Copilot.py @@ -380,6 +380,8 @@ async def get_access_token_and_cookies(url: str, proxy: str = None, needs_auth: cookies = {c.name: c.value for c in await page.send(nodriver.cdp.network.get_cookies([url]))} if not needs_auth and Copilot.anon_cookie_name in cookies: break + elif needs_auth and next(filter(lambda x: "auth0" in x, cookies), None): + break stop_browser() return access_token, useridentitytype, cookies finally: