mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-14 13:25:20 +00:00
complete cleanup of oauth clients
This commit is contained in:
parent
2c0e76beeb
commit
1bcbe1c0a0
1 changed files with 11 additions and 0 deletions
|
|
@ -401,8 +401,19 @@ class OAuthClientManager:
|
||||||
return self.clients[client_id]
|
return self.clients[client_id]
|
||||||
|
|
||||||
def remove_client(self, client_id):
|
def remove_client(self, client_id):
|
||||||
|
removed = False
|
||||||
if client_id in self.clients:
|
if client_id in self.clients:
|
||||||
del self.clients[client_id]
|
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}")
|
log.info(f"Removed OAuth client {client_id}")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue