[PR #16009] [MERGED] feat: add OAuth configuration warning for missing OPENID_PROVIDER_URL #62858

Closed
opened 2026-05-06 07:17:45 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/16009
Author: @Classic298
Created: 7/24/2025
Status: Merged
Merged: 8/4/2025
Merged by: @tjbck

Base: devHead: patch-1


📝 Commits (1)

  • 723840d add warning if OPENID_PROVIDER_URL Is not set

📊 Changes

1 file changed (+13 additions, -0 deletions)

View changed files

📝 backend/open_webui/config.py (+13 -0)

📄 Description

Pull Request Checklist

Before submitting, make sure you've checked the following:

  • Target branch: Please verify that the pull request targets the dev branch.
  • Description: Provide a concise description of the changes made in this pull request.
  • Changelog: Ensure a changelog entry following the format of [Keep a Changelog](https://keepachangelog.com/) is added at the bottom of the PR description.
  • Documentation: Have you updated relevant documentation [Open WebUI Docs](https://github.com/open-webui/docs), or other documentation sources?
  • Dependencies: Are there any new dependencies? Have you updated the dependency versions in the documentation?
  • Testing: Have you written and run sufficient tests to validate the changes?
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • feat: Introduces a new feature or enhancement to the codebase

Changelog Entry

Description

Adds a startup warning when OAuth providers (Google, Microsoft, or GitHub) are configured but the required OPENID_PROVIDER_URL environment variable is not set. This helps administrators identify incomplete OAuth configurations that would result in non-functional logout functionality.

Added

  • Configuration validation warning in load_oauth_providers() function
  • Clear messaging indicating which OAuth providers are configured and the missing requirement
  • Helpful guidance on setting the correct OPENID_PROVIDER_URL value

Changed

  • Enhanced load_oauth_providers() function to include configuration validation

Deprecated

  • None

Removed

  • None

Fixed

  • Improved user experience by proactively identifying incomplete OAuth configurations
  • Prevents silent OAuth logout failures due to missing configuration

Security

  • None

Breaking Changes

  • None

Additional Information

This change addresses a common configuration issue where users set up OAuth providers (Google, Microsoft, GitHub) but forget to configure the required OPENID_PROVIDER_URL environment variable, resulting in OAuth logout not working properly. The warning appears during application startup and provides clear guidance on how to fix the configuration.

  • No new dependencies - Uses existing logging infrastructure
  • Minimal code impact - Only adds ~10 lines at the end of existing function
  • Non-breaking - Pure addition that doesn't change existing behavior
  • Related to discussion in issue #15007 and #15999 regarding OAuth logout functionality

The warning only appears when:

  1. One or more OAuth providers are configured (have client ID/secret)
  2. OPENID_PROVIDER_URL is not set
  3. During application startup when load_oauth_providers() is called

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.


🔄 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/16009 **Author:** [@Classic298](https://github.com/Classic298) **Created:** 7/24/2025 **Status:** ✅ Merged **Merged:** 8/4/2025 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `dev` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`723840d`](https://github.com/open-webui/open-webui/commit/723840dad5855bb8ac55431b42248dbdf5c94bed) add warning if OPENID_PROVIDER_URL Is not set ### 📊 Changes **1 file changed** (+13 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/config.py` (+13 -0) </details> ### 📄 Description # Pull Request Checklist **Before submitting, make sure you've checked the following:** - [x] **Target branch:** Please verify that the pull request targets the `dev` branch. - [x] **Description:** Provide a concise description of the changes made in this pull request. - [x] **Changelog:** Ensure a changelog entry following the format of [[Keep a Changelog](https://keepachangelog.com/)](https://keepachangelog.com/) is added at the bottom of the PR description. - [x] **Documentation:** Have you updated relevant documentation [[Open WebUI Docs](https://github.com/open-webui/docs)](https://github.com/open-webui/docs), or other documentation sources? - [x] **Dependencies:** Are there any new dependencies? Have you updated the dependency versions in the documentation? - [ ] **Testing:** Have you written and run sufficient tests to validate the changes? - [x] **Code review:** Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards? - [x] **Prefix:** To clearly categorize this pull request, prefix the pull request title using one of the following: - **feat**: Introduces a new feature or enhancement to the codebase # Changelog Entry ### Description Adds a startup warning when OAuth providers (Google, Microsoft, or GitHub) are configured but the required `OPENID_PROVIDER_URL` environment variable is not set. This helps administrators identify incomplete OAuth configurations that would result in non-functional logout functionality. ### Added - Configuration validation warning in `load_oauth_providers()` function - Clear messaging indicating which OAuth providers are configured and the missing requirement - Helpful guidance on setting the correct `OPENID_PROVIDER_URL` value ### Changed - Enhanced `load_oauth_providers()` function to include configuration validation ### Deprecated - None ### Removed - None ### Fixed - Improved user experience by proactively identifying incomplete OAuth configurations - Prevents silent OAuth logout failures due to missing configuration ### Security - None ### Breaking Changes - None --- ### Additional Information This change addresses a common configuration issue where users set up OAuth providers (Google, Microsoft, GitHub) but forget to configure the required `OPENID_PROVIDER_URL` environment variable, resulting in OAuth logout not working properly. The warning appears during application startup and provides clear guidance on how to fix the configuration. - **No new dependencies** - Uses existing logging infrastructure - **Minimal code impact** - Only adds ~10 lines at the end of existing function - **Non-breaking** - Pure addition that doesn't change existing behavior - **Related to discussion in issue #15007 and #15999** regarding OAuth logout functionality **The warning only appears when:** 1. One or more OAuth providers are configured (have client ID/secret) 2. `OPENID_PROVIDER_URL` is not set 3. During application startup when `load_oauth_providers()` is called ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [[Contributor License Agreement (CLA)](https://claude.ai/CONTRIBUTOR_LICENSE_AGREEMENT)](/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 07:17:45 -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#62858