Authing DocsDocuments
Concept
workflow
Guides
Development Integration
Application integration
Concept
workflow
Guides
Development Integration
Application integration
Old Version
Development Integration
  • Single Sign-On (SSO)
  • Login component

  • JavaScript/Node.js

  • Java / Kotlin

  • Python

  • C#

  • PHP

  • Go

  • Ruby
  • Android

  • iOS

    • Quick start
    • Auth Flow
    • APIs

    • Third-party identity source

      • Wechat
      • Apple
      • Google
      • Facebook
      • Wechat Miniprogram
      • Tencent
      • Sina Weibo
      • Baidu
      • LinkedIn
      • Github
      • Gitee
      • GitLab
      • Xiaomi
      • WeCom
      • Lark
      • DingTalk
      • Line
      • Slack
    • Typical scene

    • On-premise
    • WebAuthn
    • Error Code List
  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. iOS
  4. /
  5. Third-party identity source
  6. /
  7. Lark

¶ Lark login

Update Time: 2025-05-14 08:32:28
Edit

¶ Preparation

  • For the configuration of the Authing console of the enterprise's self-built application and the Lark console, please refer to Accessing Lark's self-built application mobile application login (opens new window).

  • App store app Authing console and Lark console configuration, please refer to Access to Lark app store app mobile app login (opens new window).


¶ Integrated Lark login steps

¶ Step 1: Add Lark Login Component Dependency

  1. Enter: https://github.com/Authing/authing-binary in the swift package search bar.

  2. Select Authing-binary (opens new window).

Authing-binary (opens new window) depends on Guard-iOS SDK (opens new window).

  1. Select Up to Next Major Version 1.0.0 for the dependency rule.

  2. Check LarkLogin.


¶ Step 2: Modify project configuration

  • Go to Lark Development Platform (opens new window) to download iOS LarkSS0Demo.

  • Drag LarkSSO.bundle from the LarkSSO directory into the project directory, and check Copy items if needed .

  • Add lark under Configuration Jump Scheme: LSApplicationQueriesSchemes Key.

  • Configure Lark bounce URL: Add the app_id when registering under URL types Key (for example: clia0988c0addf81013). Note that the underscore in app_id needs to be removed.


¶ Step 3: Initialize Lark login

  1. Add import Guard and import LarkLogin to AppDelegate or SceneDelegate.
  2. Authing.start needs to pass in the application ID of Authing.
  3. LarkLogin.setupLark needs to pass in the AppId and Scheme issued by the Lark Open Platform.
import Guard
import LarkLogin

Authing.start(<#AUTHING_APP_ID#>)
LarkLogin.setupLark(<#Lark App ID#>, Scheme: <#Lark Scheme#>)

¶ Step 4: Add Lark login callback

After Lark returns to the application, if SceneDelegate is used, the following functions need to be overloaded in SceneDelegate.swift:

func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
     if let url = URLContexts.first?.url {
         _ = LarkLogin. handleUrl(url: url)
     }
}

If SceneDelegate is not used, it needs to be overloaded in AppDelegate:

func application(_ app: UIApplication, open url: URL, options: [UIApplication. OpenURLOptionsKey : Any] = [:]) -> Bool {
     return LarkLogin. handleUrl(url: url)
}

¶ Step 5: Issue a flight authorization

It is recommended to use the semantic Hyper Component we provide, just place one in the xib:

Lark Login Button

If you don't want to use our built-in button, you can call the Authing Lark login API in the click event of your own button:

LarkLogin.login(viewController: <#ViewController that presents the view#>) { (code, message, userInfo) in
     if (code == 200) {
         // userInfo: user information
     }
}
Prev: WeCom Next: DingTalk
  • Preparation
  • Integrated Lark login steps

User identity management

Integrated third-party login
Mobile phone number flash check (opens new window)
Universal login form component
Custom authentication process

Enterprise internal management

Single Sign On
Multi-factor Authentication
Authority Management

Developers

Development Document
Framework Integration
Blog (opens new window)
GitHub (opens new window)
Community User Center (opens new window)

Company

400 888 2106
sales@authing.cn
16 / F, Block B, NORTH STAR CENTURY CENTER, Beijing(Total)
room 406, 4th floor, zone B, building 1, No. 200, Tianfu Fifth Street, Chengdu(branch)

Beijing ICP No.19051205-1

© Beijing Steamory Technology Co.