OAuth 2.0 enables authentication service connection for single sign-on.
Applicable editions | Enterprise Dedicated |
Create users outside the sync scope
Administrators can configure and manage OAuth 2.0 integration in Enterprise Settings > Identity Providers. To create users not included in OAuth 2.0, select Support for built-in users: You can create users outside the sync scope.

Configure OAuth 2.0
Step 1: Configure OAuth 2.0 Client
Create an OAuth 2.0 Client as prompted.
Determine whether to skip HTTPS authentication
Fill in the following information:
Client ID
Client Secret
Auth URL
Token URL
User Info Retrieval
Access Token Delivery
Click Next.
Step 2: Configure user sync
System will link accounts with any of the following matching attribute across OAuth 2.0 and AI Coding Assistant Lingma:
Link Accounts with Same Email
Link Accounts with Same Username
Link Accounts with Same Mobile Number
Link Accounts with Employee ID
Ensure the uniqueness and existence of the attribute, as Lingma will perform one-to-one account matching based on it.
Fill in the fields. Lingma will link accounts based on the information you have entered.
Click Next.
Step 3: Enable single sign-on
By default, the single sign-on feature is not enabled. Once it is enabled, you can customize the following OAuth 2.0 single sign-on settings:
Configure the webhook address of Lingma in OAuth 2.0 Client.
Update the OAuth 2.0 client name and icon. Lingma will display the updates accordingly.
Configure advanced settings:
Disabled by default: Lingma account creation is not allowed when you log on to Lingma with OAuth 2.0 account that does not have a linked Lingma account.
Enabled: Allow you to create a Lingma account when you log on to Lingma with OAuth 2.0 account that does not have a linked Lingma account. The created Lingma account will automatically be linked to the OAuth 2.0 account.

You can also enable Single Sign-on later from the OAuth 2.0 Identity Providers page by clicking Edit Settings.

Click Save.
Log on to Lingma through OAuth 2.0
When Single Sign-on is enabled, the OAuth 2.0 logon option will appear on the Lingma logon page. Select OAuth2.0 and you'll be redirected to logon page where you can log on to Lingma with OAuth 2.0 account.

Log off from Lingma
Logging off from Lingma will cause logging off from OAuth 2.0.
Session duration
Session duration is determined by Lingma settings. Exceeding the session duration configured in Lingma will result in logoff. To continue using Lingma, you will need to log on again.
Modify OAuth 2.0 configuration
On the OAuth 2.0 Identity Providers page, the View/Modify Configuration option is available. Select this option to update the attribute mapping. Other configuration details cannot be changed.
Disable single sign-on
You can disable single sign-on on Identity Providers page by clicking Edit Settings:
The link between Lingma and OAuth 2.0 accounts will remain intact.
Logging on to Lingma via OAuth 2.0 accounts will no longer be supported, but you can use Lingma account to log on.
Remove OAuth 2.0 integration
To remove OAuth 2.0 integration, click Remove Integration on the Identity Providers page. Once removed:
The link between Lingma and OAuth 2.0 accounts will be removed.
Logging on to Lingma via OAuth 2.0 will not be supported, but you can use Lingma account to log on.