Revert "(UI) - Improvements to session handling logic (#8970)"

This reverts commit c015fb34f1.
This commit is contained in:
Ishaan Jaff 2025-03-04 13:29:08 -08:00
parent f73c03737f
commit 4b6ab52af7
7 changed files with 52 additions and 116 deletions

View file

@ -43,7 +43,6 @@ from litellm.proxy.management_endpoints.sso_helper_utils import (
)
from litellm.proxy.management_endpoints.team_endpoints import team_member_add
from litellm.proxy.management_endpoints.types import CustomOpenID
from litellm.proxy.management_helpers.ui_session_handler import UISessionHandler
from litellm.secret_managers.main import str_to_bool
if TYPE_CHECKING:
@ -691,10 +690,9 @@ async def auth_callback(request: Request): # noqa: PLR0915
)
if user_id is not None and isinstance(user_id, str):
litellm_dashboard_ui += "?userID=" + user_id
return UISessionHandler.generate_authenticated_redirect_response(
redirect_url=litellm_dashboard_ui, jwt_token=jwt_token
)
redirect_response = RedirectResponse(url=litellm_dashboard_ui, status_code=303)
redirect_response.set_cookie(key="token", value=jwt_token, secure=True)
return redirect_response
async def insert_sso_user(