From 1bcbe1c0a064b0a45925979671f9f796b061195c Mon Sep 17 00:00:00 2001 From: Taylor Wilsdon Date: Sat, 18 Oct 2025 14:16:10 -0400 Subject: [PATCH] complete cleanup of oauth clients --- backend/open_webui/utils/oauth.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/backend/open_webui/utils/oauth.py b/backend/open_webui/utils/oauth.py index 4fa493b1d5..85f694cb13 100644 --- a/backend/open_webui/utils/oauth.py +++ b/backend/open_webui/utils/oauth.py @@ -401,8 +401,19 @@ class OAuthClientManager: return self.clients[client_id] def remove_client(self, client_id): + removed = False if client_id in self.clients: del self.clients[client_id] + removed = True + if hasattr(self.oauth, "_clients"): + if client_id in self.oauth._clients: + self.oauth._clients.pop(client_id, None) + removed = True + if hasattr(self.oauth, "_registry"): + if client_id in self.oauth._registry: + self.oauth._registry.pop(client_id, None) + removed = True + if removed: log.info(f"Removed OAuth client {client_id}") return True