This commit is contained in:
Timothy Jaeryang Baek
2025-11-24 06:42:12 -05:00
parent 7ad549b4fb
commit 0f8729dea2
2 changed files with 11 additions and 1 deletions

View File

@@ -620,6 +620,11 @@ OAUTH_UPDATE_PICTURE_ON_LOGIN = PersistentConfig(
os.environ.get("OAUTH_UPDATE_PICTURE_ON_LOGIN", "False").lower() == "true",
)
OAUTH_ACCESS_TOKEN_REQUEST_INCLUDE_CLIENT_ID = (
os.environ.get("OAUTH_ACCESS_TOKEN_REQUEST_INCLUDE_CLIENT_ID", "False").lower()
== "true"
)
def load_oauth_providers():
OAUTH_PROVIDERS.clear()

View File

@@ -53,6 +53,7 @@ from open_webui.config import (
OAUTH_ADMIN_ROLES,
OAUTH_ALLOWED_DOMAINS,
OAUTH_UPDATE_PICTURE_ON_LOGIN,
OAUTH_ACCESS_TOKEN_REQUEST_INCLUDE_CLIENT_ID,
WEBHOOK_URL,
JWT_EXPIRES_IN,
AppConfig,
@@ -1273,8 +1274,12 @@ class OAuthManager:
client = self.get_client(provider)
auth_params = {}
if client:
if hasattr(client, "client_id"):
if (
hasattr(client, "client_id")
and OAUTH_ACCESS_TOKEN_REQUEST_INCLUDE_CLIENT_ID
):
auth_params["client_id"] = client.client_id
try: