BerriAI/litellm · error · ProxyException
GOOGLE_CLIENT_SECRET
GOOGLE_CLIENT_SECRET
Error message
GOOGLE_CLIENT_SECRET not set. Set it in .env file
What it means
ProxyException raised in the Google SSO callback: GOOGLE_CLIENT_SECRET is not set in the environment, so the OAuth code exchange with Google cannot be completed. A proxy configuration error requiring the secret to be added to .env before Google login works.
Source
Thrown at litellm/proxy/management_endpoints/ui_sso.py:4537
@staticmethod
async def get_google_callback_response(
request: Request,
google_client_id: str,
redirect_url: str,
return_raw_sso_response: bool = False,
) -> OpenID | dict:
"""
Get the Google SSO callback response
Args:
return_raw_sso_response: If True, return the raw SSO response
"""
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,
redirect_uri=redirect_url,
client_secret=google_client_secret,
)
# if user is trying to get the raw sso response for debugging, return the raw sso response
if return_raw_sso_response:
return (
await google_sso.verify_and_process(
request=request,
convert_response=False,
)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Set GOOGLE_CLIENT_SECRET in the .env file and restart the proxy.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:4537 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/354dde100b437320.
Report an issue: GitHub.