BerriAI/litellm · error · ProxyException
GOOGLE_CLIENT_SECRET not set. Set it in .env file
Error message
GOOGLE_CLIENT_SECRET not set. Set it in .env file
What it means
Error "GOOGLE_CLIENT_SECRET not set. Set it in .env file" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/ui_sso.py:2875
Args:
redirect_url (str): The URL to redirect the user to after login
google_client_id (Optional[str], optional): The Google Client ID. Defaults to None.
microsoft_client_id (Optional[str], optional): The Microsoft Client ID. Defaults to None.
generic_client_id (Optional[str], optional): The Generic Client ID. Defaults to None.
request: Optional FastAPI request, used to drive the ``Secure``
attribute on the ``litellm_oauth_state`` CSRF cookie.
Returns:
RedirectResponse: The redirect response from the SSO provider.
"""
# Google SSO Auth
if google_client_id is not None:
from fastapi_sso.sso.google import GoogleSSO
google_client_secret: Final = os.getenv("GOOGLE_CLIENT_SECRET", None)
if google_client_secret is None:
raise ProxyException(
message="GOOGLE_CLIENT_SECRET not set. Set it in .env file",
type=ProxyErrorTypes.auth_error,
param="GOOGLE_CLIENT_SECRET",
code=status.HTTP_500_INTERNAL_SERVER_ERROR,
)
google_sso: Final = GoogleSSO(
client_id=google_client_id,
client_secret=google_client_secret,
redirect_uri=redirect_url,
)
verbose_proxy_logger.info(
"In /google-login/key/generate, \nGOOGLE_REDIRECT_URI: %s\nGOOGLE_CLIENT_ID: %s",
redirect_url,
google_client_id,
)
with google_sso:
return await google_sso.get_login_redirect(state=state)
# Microsoft SSO AuthView on GitHub (pinned to 77b7c6c40c)
Solutions
- Set GOOGLE_CLIENT_SECRET in the .env file and restart the proxy.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:2875 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/38713573d56f8984.
Report an issue: GitHub.