feat: add Feishu OAuth integration
Implement Feishu OAuth provider using standard client: - Set up Feishu-specific endpoints for authorization, token, and userinfo - Use user_id as sub claim for Feishu user identification - Extract correct user information from nested 'data' field in Feishu responses Configuration requirements: - Set FEISHU_CLIENT_ID and FEISHU_CLIENT_SECRET environment variables to enable Feishu OAuth - Set ENABLE_OAUTH_SIGNUP=true to allow automatic user creation after OAuth login - Set DEFAULT_USER_ROLE=user to grant immediate access after OAuth registration - Set OAUTH_MERGE_ACCOUNTS_BY_EMAIL=true to enable merging of existing user accounts with matching emails
This commit is contained in:
@@ -523,6 +523,16 @@
|
||||
>
|
||||
</button>
|
||||
{/if}
|
||||
{#if $config?.oauth?.providers?.feishu}
|
||||
<button
|
||||
class="flex justify-center items-center bg-gray-700/5 hover:bg-gray-700/10 dark:bg-gray-100/5 dark:hover:bg-gray-100/10 dark:text-gray-300 dark:hover:text-white transition w-full rounded-full font-medium text-sm py-2.5"
|
||||
on:click={() => {
|
||||
window.location.href = `${WEBUI_BASE_URL}/oauth/feishu/login`;
|
||||
}}
|
||||
>
|
||||
<span>{$i18n.t('Continue with {{provider}}', { provider: 'Feishu' })}</span>
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user