Authing DocsDocuments
Concept
Guides
Development Integration
Application integration
Concept
Guides
Development Integration
Application integration
Old Version
Guides
  • Quick start

    • Authenticate your first user

    • Access methods for different types of applications

      • Integrate Authing in traditional Web App
      • Integrate in Single Page Application (SPA) Authing
      • Integrate in mobile terminal (iOS, Andriod) Authing
    • Console overview
  • Authenticate the user

  • Authority management for users

  • Authorization

  • Manage user accounts

  • Manage User Directory

  • Management Application

  • Become a source of federal authentication identity

  • Connect to an external identity provider (IdP)

  • Open up WeChat ecology
  • Migrate users to Authing

  • Management organization

  • Expandable capabilities

  • Audit Log

  • Configure security information

  • Configure user pool information

  • Deployment plan

  • Frequently Asked Questions FAQs

  1. Guides
  2. /
  3. Quick start

  4. /
  5. Access methods for different types of applications
  6. /
  7. Integrate in mobile terminal (iOS, Andriod) Authing

¶ Integrate Authing with mobile client (iOS and Android)

Update Time: 2022-06-09 11:58:27
Edit

Authing provides Android SDK and iOS SDK to help developers quickly integrate Authing in mobile apps.

Let's take the integration method of Android applications as an example.

¶ Install

    1. Download jar package and import it into lib

Jar package download address:

  • https://download.authing.cn/packages/jar/commons-codec-1.15-rep.jar (opens new window)
  • https://download.authing.cn/packages/jar/core.jar (opens new window)

Import jar package into lib, as the image shows below:

  1. Configure build.gradle
implementation "com.google.code.gson:gson:2.8.6"
implementation "com.squareup.okhttp3:okhttp:4.8.0"
implementation files('libs/core.jar')
implementation files('libs/commons-codec-1.15-rep.jar')
  1. Install authing Java/Kotlin SDK

Detailed installation guide: Authing Java/Kotlin SDK

¶ Sample of use

¶ Java

  • Initialize the AuthenticationClient with the user pool ID.
  • Call the AuthenticationClient method.
AuthenticationClient client = new AuthenticationClient("YOUR_USERPOOL_ID");

client.registerByEmail(new RegisterByEmailInput("xxx@qq.com", "123456")).enqueue(new cn.authing.core.http.Callback<cn.authing.core.types.User>() {
    @Override
    public void onSuccess(cn.authing.core.types.User user) {

    }

    @Override
    public void onFailure(@Nullable GraphQLResponse.ErrorInfo errorInfo) {

    }
});

¶ Kotlin

  • Initialize the AuthenticationClient with the user pool ID.
  • Call the AuthenticationClient method.
val authenticationClient = AuthenticationClient("YOUR_USERPOOL_ID")

authenticationClient.registerByEmail(
    RegisterByEmailInput(
        "xxx@.qq.com",
        "123456"
    )
).enqueue(object : cn.authing.core.http.Callback<User> {
    override fun onFailure(error: ErrorInfo?) {

    }

    override fun onSuccess(result: User) {

    }
})

¶ User registration and login

Authing Java SDK supports multiple registration and login methods such as mobile SMS verification code, email, username, etc. Take mobile phone number verification code login as an example:

  1. Send SMS verification code:
String phone = "phone number";
authenticationClient.sendSmsCode(phone).execute();
  1. Use SMS verification code to login:
String phone = "phone number";
String code = "1234";
User user = authenticationClient.loginByPhoneCode(new LoginByPhoneCodeInput(phone, code)).execute();

For detailed document please see: User registration and login API.

¶ More help

Join us on forum: #authing-chat (opens new window)

Prev: Integrate in Single Page Application (SPA) Authing Next: Console overview
  • Install
  • Sample of use
  • User registration and login
  • More help

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.