Skip to content

[Feature] UI - Login: New Login With SSO Button#20908

Merged
yuneng-jiang merged 2 commits intomainfrom
litellm_ui_login_sso_redir
Feb 11, 2026
Merged

[Feature] UI - Login: New Login With SSO Button#20908
yuneng-jiang merged 2 commits intomainfrom
litellm_ui_login_sso_redir

Conversation

@yuneng-jiang
Copy link
Collaborator

Relevant issues

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

CI (LiteLLM team)

CI status guideline:

  • 50-55 passing tests: main is stable with minor issues.
  • 45-49 passing tests: acceptable but needs attention
  • <= 40 passing tests: unstable; be careful with your merges and assess the risk.
  • Branch creation CI run
    Link:

  • CI run for the last commit
    Link:

  • Merge / cherry-pick CI run
    Links:

Type

🆕 New Feature
✅ Test

Changes

  • Default behavior: AUTO_REDIRECT_UI_LOGIN_TO_SSO now defaults to false instead of true. When SSO is configured, users see the login form by default instead of being automatically redirected to SSO.
  • Login with SSO button: Added a "Login with SSO" button on the login page. When SSO is configured, the button navigates to the SSO flow. When SSO is not configured, the button is disabled and shows a popover prompting the user to configure SSO.
  • Discovery endpoint: The /.well-known/litellm-ui-config endpoint now includes sso_configured so the UI can conditionally render the SSO button.
  • Tests added for the new default and the Login with SSO button behavior.

Screenshots

image image image

@vercel
Copy link

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
litellm Ready Ready Preview, Comment Feb 11, 2026 1:38am

Request Review

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 11, 2026

Greptile Overview

Greptile Summary

Changes the default login behavior so users see a login form instead of being auto-redirected to SSO. Adds a "Login with SSO" button to the login page that is enabled when SSO is configured and disabled (with a popover hint) when it's not. The /.well-known/litellm-ui-config discovery endpoint now exposes sso_configured so the UI can conditionally render the button. AUTO_REDIRECT_UI_LOGIN_TO_SSO now defaults to false.

  • Breaking change: AUTO_REDIRECT_UI_LOGIN_TO_SSO default flipped from true to false — existing deployments relying on auto-redirect will need to explicitly set this env var to true
  • New sso_configured field added to UiDiscoveryEndpoints model and the corresponding TypeScript interface
  • Login page conditionally renders an enabled or disabled "Login with SSO" button based on sso_configured
  • Tests added for both backend (new default behavior test) and frontend (SSO button enabled/disabled states)

Confidence Score: 4/5

  • This PR is safe to merge; the only risk is the breaking default change for existing SSO users.
  • Clean, well-tested feature with no logic bugs. Score of 4 (not 5) because the default change for AUTO_REDIRECT_UI_LOGIN_TO_SSO is a breaking behavior change that could impact existing deployments relying on auto-redirect — this should be clearly communicated in release notes.
  • No files require special attention from a code correctness standpoint.

Important Files Changed

Filename Overview
litellm/proxy/discovery_endpoints/ui_discovery_endpoints.py Changed default of AUTO_REDIRECT_UI_LOGIN_TO_SSO from "true" to "false", added sso_configured field to the response by calling _has_user_setup_sso() once and reusing the result.
litellm/types/proxy/discovery_endpoints/ui_discovery_endpoints.py Added sso_configured: bool field to the UiDiscoveryEndpoints Pydantic model.
ui/litellm-dashboard/src/app/login/LoginPage.tsx Added "Login with SSO" button that is enabled when SSO is configured (navigates to SSO flow) and disabled with a Popover when SSO is not configured.
ui/litellm-dashboard/src/components/networking.tsx Added sso_configured: boolean to the LiteLLMWellKnownUiConfig TypeScript interface.
docs/my-website/docs/proxy/config_settings.md Updated documentation to reflect the new default value of AUTO_REDIRECT_UI_LOGIN_TO_SSO from true to false.

Sequence Diagram

sequenceDiagram
    participant User
    participant LoginPage
    participant UIConfigEndpoint as /.well-known/litellm-ui-config
    participant SSOFlow as /sso/key/generate

    User->>LoginPage: Navigate to login
    LoginPage->>UIConfigEndpoint: GET ui config
    UIConfigEndpoint-->>LoginPage: { sso_configured, auto_redirect_to_sso, ... }

    alt auto_redirect_to_sso is true
        LoginPage->>SSOFlow: Redirect to SSO
    else sso_configured is true
        LoginPage-->>User: Show login form + enabled "Login with SSO" button
        User->>SSOFlow: Click "Login with SSO"
    else sso_configured is false
        LoginPage-->>User: Show login form + disabled "Login with SSO" button
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@yuneng-jiang yuneng-jiang merged commit dc8934c into main Feb 11, 2026
55 of 67 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant