[#7130] added Lark OAuth2 provider

Co-authored-by: mashizora <30516315+mashizora@users.noreply.github.com>
This commit is contained in:
Gani Georgiev
2025-08-30 12:51:34 +03:00
parent cc902f2df8
commit 45af9e201c
37 changed files with 254 additions and 99 deletions
@@ -0,0 +1,49 @@
<script>
import Field from "@/components/base/Field.svelte";
import ObjectSelect from "@/components/base/ObjectSelect.svelte";
export let config = {};
const DOMAIN_FEISHU = "feishu.cn";
const DOMAIN_LARKSUITE = "larksuite.com";
const domainOptions = [
{ label: "Feishu (China)", value: DOMAIN_FEISHU },
{ label: "Lark (International)", value: DOMAIN_LARKSUITE },
];
let domain = DOMAIN_FEISHU;
if (config.authURL?.includes(DOMAIN_LARKSUITE)) {
domain = DOMAIN_LARKSUITE;
}
$: {
config.authURL = `https://accounts.${domain}/open-apis/authen/v1/authorize`;
config.tokenURL = `https://open.${domain}/open-apis/authen/v2/oauth/token`;
config.userInfoURL = `https://open.${domain}/open-apis/authen/v1/user_info`;
}
</script>
<Field class="form-field" let:uniqueId>
<label for={uniqueId}>Site</label>
<ObjectSelect id={uniqueId} items={domainOptions} bind:keyOfSelected={domain} />
</Field>
<div class="alert alert-info">
<div class="icon">
<i class="ri-information-line" />
</div>
<div class="content">
Note that the Lark user's <strong>Union ID</strong> will be used for the association with the
PocketBase user (see
<a
href="https://open.feishu.cn/document/platform-overveiw/basic-concepts/user-identity-introduction/introduction#3f2d4b63"
target="_blank"
rel="noopener noreferrer"
>
Different Types of Lark IDs
</a>
).
</div>
</div>
+7
View File
@@ -1,4 +1,5 @@
import AppleOptions from "@/components/collections/providers/AppleOptions.svelte";
import LarkOptions from "@/components/collections/providers/LarkOptions.svelte";
import MicrosoftOptions from "@/components/collections/providers/MicrosoftOptions.svelte";
import OIDCOptions from "@/components/collections/providers/OIDCOptions.svelte";
import SelfHostedOptions from "@/components/collections/providers/SelfHostedOptions.svelte";
@@ -113,6 +114,12 @@ export default [
title: "monday.com",
logo: "monday.svg",
},
{
key: "lark",
title: "Lark",
logo: "lark.svg",
optionsComponent: LarkOptions,
},
{
key: "box",
title: "Box",