mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 04:15:25 +00:00
refac
This commit is contained in:
parent
e493562735
commit
0330dc3159
1 changed files with 3 additions and 5 deletions
|
|
@ -616,15 +616,13 @@ class OAuthManager:
|
||||||
|
|
||||||
self._clients = {}
|
self._clients = {}
|
||||||
|
|
||||||
for _, provider_config in OAUTH_PROVIDERS.items():
|
for name, provider_config in OAUTH_PROVIDERS.items():
|
||||||
if "register" not in provider_config:
|
if "register" not in provider_config:
|
||||||
log.error(
|
log.error(f"OAuth provider {name} missing register function")
|
||||||
f"OAuth provider {provider_config['name']} missing register function"
|
|
||||||
)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
client = provider_config["register"](self.oauth)
|
client = provider_config["register"](self.oauth)
|
||||||
self._clients[provider_config["name"]] = client
|
self._clients[name] = client
|
||||||
|
|
||||||
def get_client(self, provider_name):
|
def get_client(self, provider_name):
|
||||||
if provider_name not in self._clients:
|
if provider_name not in self._clients:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue