Skip to content

🪪 fix: Add Admin Panel SSO URL Config - #13220

Merged
danny-avila merged 3 commits into
devfrom
danny-avila/fix-admin-panel-sso-url
May 21, 2026
Merged

danny-avila merged 3 commits into
devfrom
danny-avila/fix-admin-panel-sso-url

Conversation

@danny-avila

@danny-avila danny-avila commented May 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

I added explicit admin panel URL configuration for Helm deployments and documented the OpenID SSO callback requirements so separate admin panel deployments do not fall back to the localhost callback target.

  • Added ADMIN_PANEL_URL to .env.example with guidance for separately hosted admin panels.
  • Added librechat.adminPanelUrl to Helm values and rendered it into ADMIN_PANEL_URL unless librechat.configEnv.ADMIN_PANEL_URL is already provided with a non-empty value.
  • Documented the admin panel SSO setup, required OpenID provider callback URL, optional admin panel base paths, and the no-trailing-slash requirement.
  • Bumped the LibreChat Helm chart version to 2.0.4.

Closes #13218

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Testing

  • Ran git diff --check.
  • Ran helm lint helm/librechat --set mongodb.enabled=false --set meilisearch.enabled=false --set redis.enabled=false --set librechat-rag-api.enabled=false.
  • Rendered a dependency-built temp chart to confirm librechat.adminPanelUrl emits ADMIN_PANEL_URL, configEnv.ADMIN_PANEL_URL overrides it when non-empty, and an empty configEnv.ADMIN_PANEL_URL still falls back to librechat.adminPanelUrl.

Test Configuration:

  • Helm CLI from local environment
  • Chart: helm/librechat

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings

Copilot AI review requested due to automatic review settings May 21, 2026 04:32
@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an explicit Helm configuration surface for LibreChat’s ADMIN_PANEL_URL and documents the required OpenID SSO redirect URI so separately hosted admin panels don’t fall back to the localhost default during admin OAuth flows.

Changes:

  • Added librechat.adminPanelUrl to the Helm chart values and rendered it into ADMIN_PANEL_URL (with an override mechanism).
  • Documented Admin Panel SSO setup and the required OpenID provider callback URL in the Helm chart README.
  • Added ADMIN_PANEL_URL to .env.example and bumped the Helm chart version to 2.0.4.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
helm/librechat/values.yaml Introduces librechat.adminPanelUrl value for Helm-based deployments.
helm/librechat/templates/configmap-env.yaml Renders ADMIN_PANEL_URL into the ConfigMap when configured.
helm/librechat/readme.md Documents how to configure admin panel SSO and the OpenID redirect URI.
helm/librechat/Chart.yaml Bumps chart version to reflect template/value changes.
.env.example Documents ADMIN_PANEL_URL and clarifies admin OpenID redirect URI usage.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{{- if and (not (dig "configEnv" "REDIS_URI" "" .Values.librechat)) .Values.redis.enabled }}
REDIS_URI: redis://{{ include "common.names.fullname" .Subcharts.redis }}-master.{{ .Release.Namespace | lower }}.svc.cluster.local:6379
{{- end }}
{{- if and .Values.librechat.adminPanelUrl (not (hasKey (default dict .Values.librechat.configEnv) "ADMIN_PANEL_URL")) }}
Comment thread helm/librechat/values.yaml Outdated
Comment on lines +36 to +38
# External admin panel origin used for admin OAuth/SSO redirects.
# Required when deploying the admin panel on a separate URL.
# Example: https://admin.example.com
Comment thread helm/librechat/readme.md
Comment thread .env.example Outdated
Comment on lines +36 to +38
# External admin panel origin used for admin OAuth/SSO redirects.
# Required when the admin panel is hosted separately from LibreChat.
# Example: https://admin.example.com
@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: 🚀 deployed

The LibreChat-pr-13220 index is now live on the MCP server.
Deploy run

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce10bdd2d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +21 to +22
{{- if and .Values.librechat.adminPanelUrl (not (dig "configEnv" "ADMIN_PANEL_URL" "" .Values.librechat)) }}
ADMIN_PANEL_URL: {{ .Values.librechat.adminPanelUrl | quote }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Prevent empty configEnv from overriding ADMIN_PANEL_URL fallback

When librechat.configEnv.ADMIN_PANEL_URL is present but empty (""), this block still emits ADMIN_PANEL_URL from librechat.adminPanelUrl, and then toYaml .Values.librechat.configEnv emits a second ADMIN_PANEL_URL key with the empty value. In rendered YAML, the later duplicate key wins, so the container receives an empty ADMIN_PANEL_URL instead of the fallback, which breaks the documented “empty configEnv should fall back” behavior for separated admin-panel SSO deployments.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in 2ec071f. The template now omits an empty configEnv.ADMIN_PANEL_URL from the rendered configEnv map when librechat.adminPanelUrl supplies the fallback, so the chart emits exactly one ADMIN_PANEL_URL. I re-ran git diff --check, helm lint helm/librechat --set mongodb.enabled=false --set meilisearch.enabled=false --set redis.enabled=false --set librechat-rag-api.enabled=false, and dependency-built render assertions for fallback, non-empty override, and empty override cases.

@danny-avila

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danny-avila
danny-avila marked this pull request as ready for review May 21, 2026 04:54
@danny-avila
danny-avila changed the base branch from main to dev May 21, 2026 04:54
@danny-avila
danny-avila merged commit 830d124 into dev May 21, 2026
2 checks passed
@danny-avila
danny-avila deleted the danny-avila/fix-admin-panel-sso-url branch May 21, 2026 04:54
@github-actions

Copy link
Copy Markdown
Contributor

GitNexus: ❌ deploy failed

The deploy failed — the previous index (if any) continues to be served.
Deploy run

fuuuzzy pushed a commit to fuuuzzy/LibreChat that referenced this pull request May 22, 2026
* fix: Add admin panel URL Helm configuration

* fix: Clarify admin panel URL configuration

* fix: Avoid duplicate admin panel URL env
ThomasVuNguyen pushed a commit to ThomasVuNguyen/LibreChat that referenced this pull request Jul 15, 2026
* fix: Add admin panel URL Helm configuration

* fix: Clarify admin panel URL configuration

* fix: Avoid duplicate admin panel URL env
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.

Admin panel SSO fails without undocumented ADMIN_PANEL_URL env var

2 participants