Back to Lobehub

Configuring Feishu (Lark) Authentication for LobeHub

docs/self-hosting/auth/providers/feishu.mdx

2.1.562.3 KB
Original Source

Configuring Feishu (Lark) Authentication

Feishu (also known as Lark internationally) is an enterprise collaboration platform by ByteDance.

<Steps> ### Create Application in Feishu Open Platform
  1. Go to Feishu Open Platform
  2. Click Create App > Enterprise Self-built App
  3. Fill in the app name and description
  4. After creation, go to Credentials & Basic Info to get:
    • App ID
    • App Secret

Configure OAuth Permissions

  1. In app settings, go to Security Settings
  2. Add the redirect URI

<Callout type={'info'}> Callback URL format:

- Local development: `http://localhost:3210/api/auth/callback/feishu`
- Production: `https://your-domain.com/api/auth/callback/feishu`
</Callout>
  1. Go to Permissions & Scopes and add:
    • contact:user.email:readonly (read user email)
    • contact:user.base:readonly (read basic user info)

Publish the Application

  1. Go to Version Management & Release
  2. Create a new version and submit for review
  3. Once approved, publish the app

Configure Environment Variables

Environment VariableTypeDescription
AUTH_SECRETRequiredSession encryption key, generate with openssl rand -base64 32
AUTH_SSO_PROVIDERSRequiredSet to feishu
AUTH_FEISHU_APP_IDRequiredApp ID from Feishu Open Platform
AUTH_FEISHU_APP_SECRETRequiredApp Secret from Feishu Open Platform

<Callout type={'tip'}> Go to 📘 Environment Variables for detailed information. </Callout> </Steps>

<Callout type={'info'}> After successful deployment, users will be able to authenticate with Feishu and use LobeHub. </Callout>