BerriAI/litellm · error · HTTPException
OAuth error: {oauth_error}, error_description: {oauth_error_
Error message
OAuth error: {oauth_error}, error_description: {oauth_error_description} What it means
Error "OAuth error: {oauth_error}, error_description: {oauth_error_description}" thrown in BerriAI/litellm.
Source
Thrown at litellm/proxy/management_endpoints/ui_sso.py:1978
)
user_role = LitellmUserRoles.PROXY_ADMIN.value
return user_role
@router.get("/sso/callback", tags=["experimental"], include_in_schema=False)
async def auth_callback(request: Request, state: str | None = None):
"""Verify login"""
verbose_proxy_logger.info("Starting SSO callback with state: %s", state)
oauth_error: Final = request.query_params.get("error")
if oauth_error:
oauth_error_description: Final = request.query_params.get("error_description")
verbose_proxy_logger.warning(
"SSO callback received OAuth error: %s, description: %s", oauth_error, oauth_error_description
)
raise HTTPException(
status_code=401,
detail=f"OAuth error: {oauth_error}"
+ (f", error_description: {oauth_error_description}" if oauth_error_description else ""),
)
# Check if this is a CLI login (state starts with our CLI prefix)
from litellm.constants import LITELLM_CLI_SESSION_TOKEN_PREFIX
from litellm.proxy._types import LiteLLM_JWTAuth
from litellm.proxy.auth.handle_jwt import JWTHandler
from litellm.proxy.proxy_server import (
general_settings,
jwt_handler,
master_key,
prisma_client,
user_api_key_cache,
)
if prisma_client is None:View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the OAuth error and description returned by the provider; verify client id/secret, redirect URIs, and provider app configuration.
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/ui_sso.py:1978 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/83f6f779eb2a0a87.
Report an issue: GitHub.