16 views
-/https://github.com/berriai/litellm/issues/19856
GitHub · issue

#19856 [Bug]: LiteLLM UI redirects to /ui/login after oauth2-proxy auth, bypassing Custom UI SSO handler

  • State: open
  • Author: @azizbyahia
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

When deploying LiteLLM behind oauth2-proxy (reverse proxy) and configuring a custom_ui_sso_sign_in_handler, authentication at oauth2-proxy succeeds, but the litellm is required another authentification

As a result, LiteLLM UI enters its internal login flow and never calls the Custom UI SSO handler, making header-based SSO unusable.

**Expected behavior**

- oauth2-proxy authenticates the user - - oauth2-proxy redirects back to LiteLLM - - LiteLLM directly loads /ui - - handle_custom_ui_sso_sign_in() is called - - No internal LiteLLM login page is shown

**Actual behavior**

- oauth2-proxy authentication succeeds - - oauth2-proxy redirects to /ui/login - - LiteLLM UI loads its internal login page - - Custom UI SSO handler is never invoked - - User is stuck in an authentication loop

Network trace shows: `/oauth2/callback → 302 → /ui/login`

### Steps to Reproduce

this is the chart values ```yaml proxy_config: general_settings: custom_ui_sso_sign_in_handler: custom_sso_handler.custom_ui_sso_sign_in_handler

volumes: - name:…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d18h29m12s ago — entered · #import:https:::github.com:berriai:litellm post #2391
The right-hand change has substantially broader scope: it introduces a new credential-exchange lifecycle, secure token rotation and caching, provider configuration, cross-environment compatibility, and extensive integration testing. The left-hand change is comparatively localized to request routing and authentication state handling.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search