跳到主内容

Lark OAuth

1. Create a Lark application

On the Lark Open Platform, create an application and enable it. In the app’s basic information, note App ID and App Secret. In security settings, add the redirect URL: <your-casdoor-domain>/callback (e.g. https://door.example.com/callback).

create a new app 添加重定向URL

2. Create the provider in Casdoor

ProvidersAdd. Set Category to OAuth, Type to Lark. Map:

CasdoorLark
Client IDApp ID
Client secretApp Secret

创建一个Lark OAuth提供商

Username handling

Casdoor chooses the username from Lark’s response in this order: UserId (preferred), UnionId (links users across Lark orgs), OpenId (fallback, always present). This keeps sign-in working even when some fields are missing.