diff --git a/auth/oauth.py b/auth/oauth.py index 413fab28..1837ed4b 100644 --- a/auth/oauth.py +++ b/auth/oauth.py @@ -769,6 +769,10 @@ async def oauth_callback_http(request: Request) -> JSONResponse | RedirectRespon "code_verifier": code_verifier, } + # Google требует client_secret даже при использовании PKCE + if hasattr(client, "client_secret") and client.client_secret: + token_data["client_secret"] = client.client_secret + async with httpx.AsyncClient() as http_client: response = await http_client.post( token_endpoint, data=token_data, headers={"Accept": "application/json"}