[PR #24273] fix: accept documented Feishu OAuth env aliases #66428

Open
opened 2026-05-06 12:47:11 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24273
Author: @Genmin
Created: 5/1/2026
Status: 🔄 Open

Base: devHead: codex/fix-feishu-oauth-env-fallback


📝 Commits (3)

  • 540e37a Fix Feishu OAuth env aliases
  • cc503d2 fix: ignore empty Feishu env aliases
  • 6b85640 test: cover documented Feishu scope precedence

📊 Changes

3 files changed (+121 additions, -4 deletions)

View changed files

📝 backend/open_webui/config.py (+9 -4)
backend/open_webui/test/utils/test_env_vars.py (+94 -0)
backend/open_webui/utils/env_vars.py (+18 -0)

📄 Description

Pull Request Checklist

  • Target branch: this PR targets dev.
  • Description: Feishu OAuth now accepts the documented FEISHU_CLIENT_SCOPE and FEISHU_CLIENT_REDIRECT_URI env vars, while retaining FEISHU_OAUTH_SCOPE and FEISHU_REDIRECT_URI as legacy fallbacks.
  • Changelog: included below.
  • Documentation: existing docs already use the documented names; this makes code match them.
  • Dependencies: no dependency changes.
  • Testing: focused automated tests and compile checks are listed below.
  • Agentic AI Code: not checked here; Genmin should confirm this according to project policy if needed.
  • Code review: reviewed the diff for compatibility with existing persistent config paths.
  • Design & Architecture: preserves existing config paths and adds only a small env alias helper.
  • Git Hygiene: rebased onto dev; one logical change.
  • Title Prefix: uses fix:.

Changelog Entry

Description

  • Accept documented Feishu OAuth env names while preserving legacy aliases.

Added

  • Focused tests for documented env precedence, legacy fallback, and default behavior.

Changed

  • FEISHU_CLIENT_SCOPE now takes precedence over FEISHU_OAUTH_SCOPE.
  • FEISHU_CLIENT_REDIRECT_URI now takes precedence over FEISHU_REDIRECT_URI.

Deprecated

  • None.

Removed

  • None.

Fixed

  • Fixed Feishu OAuth deployments following the docs so explicit redirect URIs are passed to Authlib instead of falling back to request URL inference.

Security

  • None.

Breaking Changes

  • None. Legacy env vars remain supported.

Additional Information

Fixes #24094.

Validation run:

  • PYTHONPATH=backend uv run --no-sync --with pytest --with typer --with uvicorn pytest backend/open_webui/test/utils/test_env_vars.py -q
  • uv run --no-sync --with ruff ruff check backend/open_webui/utils/env_vars.py backend/open_webui/test/utils/test_env_vars.py
  • PYTHONPATH=backend uv run --no-sync --with typer --with uvicorn python -m compileall -q backend/open_webui/config.py backend/open_webui/utils/env_vars.py backend/open_webui/test/utils/test_env_vars.py
  • git diff --check

Screenshots or Videos

  • Not applicable; backend env parsing fix.

Contributor License Agreement


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/24273 **Author:** [@Genmin](https://github.com/Genmin) **Created:** 5/1/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `codex/fix-feishu-oauth-env-fallback` --- ### 📝 Commits (3) - [`540e37a`](https://github.com/open-webui/open-webui/commit/540e37a04aec14eb71ce8e6b28c6bcecb0b0043d) Fix Feishu OAuth env aliases - [`cc503d2`](https://github.com/open-webui/open-webui/commit/cc503d252870e1d44d8cd9384777ca1396c4bb73) fix: ignore empty Feishu env aliases - [`6b85640`](https://github.com/open-webui/open-webui/commit/6b85640f251f08dc6158c4041c62facc0b8d110d) test: cover documented Feishu scope precedence ### 📊 Changes **3 files changed** (+121 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+9 -4) ➕ `backend/open_webui/test/utils/test_env_vars.py` (+94 -0) ➕ `backend/open_webui/utils/env_vars.py` (+18 -0) </details> ### 📄 Description ## Pull Request Checklist - [x] Target branch: this PR targets `dev`. - [x] Description: Feishu OAuth now accepts the documented `FEISHU_CLIENT_SCOPE` and `FEISHU_CLIENT_REDIRECT_URI` env vars, while retaining `FEISHU_OAUTH_SCOPE` and `FEISHU_REDIRECT_URI` as legacy fallbacks. - [x] Changelog: included below. - [x] Documentation: existing docs already use the documented names; this makes code match them. - [x] Dependencies: no dependency changes. - [x] Testing: focused automated tests and compile checks are listed below. - [ ] Agentic AI Code: not checked here; Genmin should confirm this according to project policy if needed. - [x] Code review: reviewed the diff for compatibility with existing persistent config paths. - [x] Design & Architecture: preserves existing config paths and adds only a small env alias helper. - [x] Git Hygiene: rebased onto `dev`; one logical change. - [x] Title Prefix: uses `fix:`. ## Changelog Entry ### Description - Accept documented Feishu OAuth env names while preserving legacy aliases. ### Added - Focused tests for documented env precedence, legacy fallback, and default behavior. ### Changed - `FEISHU_CLIENT_SCOPE` now takes precedence over `FEISHU_OAUTH_SCOPE`. - `FEISHU_CLIENT_REDIRECT_URI` now takes precedence over `FEISHU_REDIRECT_URI`. ### Deprecated - None. ### Removed - None. ### Fixed - Fixed Feishu OAuth deployments following the docs so explicit redirect URIs are passed to Authlib instead of falling back to request URL inference. ### Security - None. ### Breaking Changes - None. Legacy env vars remain supported. --- ### Additional Information Fixes #24094. Validation run: - `PYTHONPATH=backend uv run --no-sync --with pytest --with typer --with uvicorn pytest backend/open_webui/test/utils/test_env_vars.py -q` - `uv run --no-sync --with ruff ruff check backend/open_webui/utils/env_vars.py backend/open_webui/test/utils/test_env_vars.py` - `PYTHONPATH=backend uv run --no-sync --with typer --with uvicorn python -m compileall -q backend/open_webui/config.py backend/open_webui/utils/env_vars.py backend/open_webui/test/utils/test_env_vars.py` - `git diff --check` ### Screenshots or Videos - Not applicable; backend env parsing fix. ### Contributor License Agreement - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 12:47:12 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#66428