mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-11 03:38:38 +00:00
add fix to auth error
This commit is contained in:
parent
7b47dffefd
commit
0586d83c16
1 changed files with 8 additions and 0 deletions
|
|
@ -1308,6 +1308,14 @@ async def auth_callback(request: Request, state: Optional[str] = None): # noqa:
|
|||
"""Verify login"""
|
||||
verbose_proxy_logger.info(f"Starting SSO callback with state: {state}")
|
||||
|
||||
oauth_error = request.query_params.get("error")
|
||||
oauth_error_description = request.query_params.get("error_description")
|
||||
if oauth_error:
|
||||
raise HTTPException(
|
||||
status_code=401,
|
||||
detail=f"OAuth error: {oauth_error}, error_description: {oauth_error_description}",
|
||||
)
|
||||
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue