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
2b2d123531
commit
6f6412dd16
4 changed files with 5 additions and 5 deletions
|
|
@ -166,7 +166,7 @@ def get_headers_and_cookies(
|
|||
elif auth_type == "session":
|
||||
cookies = request.cookies
|
||||
token = request.state.token.credentials
|
||||
elif auth_type == "oauth":
|
||||
elif auth_type == "system_oauth":
|
||||
cookies = request.cookies
|
||||
|
||||
oauth_token = None
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ async def get_tools(
|
|||
headers["Authorization"] = (
|
||||
f"Bearer {request.state.token.credentials}"
|
||||
)
|
||||
elif auth_type == "oauth":
|
||||
elif auth_type == "system_oauth":
|
||||
cookies = request.cookies
|
||||
oauth_token = extra_params.get("__oauth_token__", None)
|
||||
if oauth_token:
|
||||
|
|
|
|||
|
|
@ -330,7 +330,7 @@
|
|||
{#if !ollama}
|
||||
<option value="session">{$i18n.t('Session')}</option>
|
||||
{#if !direct}
|
||||
<option value="oauth">{$i18n.t('OAuth')}</option>
|
||||
<option value="system_oauth">{$i18n.t('OAuth')}</option>
|
||||
{/if}
|
||||
{/if}
|
||||
</select>
|
||||
|
|
@ -355,7 +355,7 @@
|
|||
>
|
||||
{$i18n.t('Forwards system user session credentials to authenticate')}
|
||||
</div>
|
||||
{:else if auth_type === 'oauth'}
|
||||
{:else if auth_type === 'system_oauth'}
|
||||
<div
|
||||
class={`text-xs self-center translate-y-[1px] ${($settings?.highContrastMode ?? false) ? 'text-gray-800 dark:text-gray-100' : 'text-gray-500'}`}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@
|
|||
<option value="session">{$i18n.t('Session')}</option>
|
||||
|
||||
{#if !direct}
|
||||
<option value="oauth">{$i18n.t('OAuth')}</option>
|
||||
<option value="system_oauth">{$i18n.t('OAuth')}</option>
|
||||
{/if}
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue