GenAuth DocsDocuments
Concepts
User Guide
Development Integration
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Concepts
User Guide
Development Integration
Metadata
Development Integration
Multi-tenant (beta)
Console Documentation
Multi-tenant Console
Tenant Console
Saas Application Demo
Old version
  • Single Page Web Application

  • Mobile and Client Applications

    • Android

      • Quick Start
      • Hosted Pages
      • Components

      • APIs

      • Social Login

      • Typical Scenarios

      • Private Deployment
      • Version History
    • C#

    • Flutter

    • iOS

    • React Native
  • Standard Web Application

  • Framework Integration

  • Others

  1. Development Integration
  2. /
  3. Mobile and Client Applications
  4. /
  5. Android
  6. /
  7. Quick Start

¶ 快速开始

Update time: 2025-04-11 11:21:15
Edit

¶ 第一步:新建 Android 工程

drawing drawing

注意:Minimum SDK 版本 Android 7.0

¶ 第二步:添加 Guard 依赖

在工程根目录的 build.gradle 文件里面需包含 mavenCentral

buildscript {
   repositories {
       mavenCentral()
       // other repositories
   }
}

在主工程的 build.gradle 文件里面添加依赖

implementation 'cn.authing:guard:+'

¶ 第三步:初始化

在应用启动时调用:

// context is application or initial activity
// ”appId“ is obtained from the GenAuth console
GenAuth.init(context, "appId");

注意:appId 是应用 ID,不是用户池 ID

¶ 第四步:常用操作

¶ 1. 注册/登录并获取用户信息

  • 使用 SDK 托管页
  • 使用 SDK 超组件
  • 使用 SDK API

¶ 2. 第三方身份源登录

¶ 3. 典型场景

¶ 4. 私有化部署

Previous article: Android Next article: Hosted Pages
  • 第一步:新建 Android 工程
  • 第二步:添加 Guard 依赖
  • 第三步:初始化
  • 第四步:常用操作

User identity management

Integrated third-party login
Customized authentication process

Enterprise internal management

Single sign-on
Multi-factor authentication
Permission management

Developer

Development Documentation
GitHub (opens new window)

Company

official@genauth.ai
16th Floor, Building B, Beichen Century Center, Chaoyang District, Beijing (Total)
Room 406, 4th Floor, Block B, No. 200, Tianfu Fifth Street, High-tech Zone, Chengdu (Branch)

© Beijing Steamory Technology Co., Ltd.