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

    • Quick start
    • Hosting page
    • APIs

      • Authentication
      • OIDC
      • MFA
      • Scan to login
      • Device management
      • Event subscription
    • Third-party identity source

    • Scenario

    • On-premise
    • Android Guard Change log
    • Error code
  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Android
  4. /
  5. APIs
  6. /
  7. MFA

¶ MFA API

Update Time: 2026-03-25 09:13:34
Edit

¶ MFA check

Check if phone number or email address can be used for MFA

public static void mfaCheck(String phone, String email, @NotNull AuthCallback<JSONObject> callback)

param

  • phone phone number to be checked. can be null
  • email email address to be checked. can be null

example

AuthClient.mfaCheck("188xxxx8888", null, (code, message, ok) -> {
    if (code == 200) {
        if (ok) {
            
        }
    }
});

AuthClient.mfaCheck(null, "abc@gmail.com", (code, message, ok) -> {
    if (code == 200) {
        if (ok) {
            
        }
    }
});

¶ SMS

MFA by SMS

public static void mfaVerifyByPhone(String phone, String code, @NotNull AuthCallback<UserInfo> callback)

param

  • phone phone number
  • code SMS verification code

example

AuthClient.mfaVerifyByPhone("188xxxx8888", "1234", (code, message, userInfo)->{
});

¶ Email

MFA by email

public static void mfaVerifyByEmail(String email, String code, @NotNull AuthCallback<UserInfo> callback)

param

  • email email address
  • code email verification code

example

AuthClient.mfaVerifyByEmail("abc@gmail.com", "1234", (code, message, userInfo)->{
});

¶ TOTP

MFA by TOTP (Time-based One Time Password)

public static void mfaVerifyByTOTP(String code, @NotNull AuthCallback<UserInfo> callback)

param

  • code TOTP code

example

AuthClient.mfaVerifyByTOTP("1234", (code, message, userInfo)->{
});

¶ Recovery code

MFA by recovery code. When user binds TOTP, a recovery code will be generated. User should save this code securely and pass it as parameter for this API

When MFA succeed, a new recovery code will be generated, the old one becomes invalid

public static void mfaVerifyByRecoveryCode(String code, @NotNull AuthCallback<UserInfo> callback)

param

  • code recovery code

example

AuthClient.mfaVerifyByRecoveryCode("1234", (code, message, userInfo)->{
    // new recovery code
    String newCode = userInfo.getRecoveryCode();
});

¶ Unbind the MFA phone number

Unbind the MFA phone number。

public static void unBindMfaPhone(@NotNull AuthCallback<JSONObject> callback)

example

AuthClient.unBindMfaPhone((code, message, data)->{
    if (code == 200) {
      //successful
    }
});

¶ Unbind the MFA email

Unbind the MFA email。

public static void unBindMfaEmail(@NotNull AuthCallback<JSONObject> callback)

example

AuthClient.unBindMfaEmail((code, message, data)->{
    if (code == 200) {
      //successful
    }
});

Prev: OIDC Next: Scan to login
  • MFA check
  • SMS
  • Email
  • TOTP
  • Recovery code
  • Unbind the MFA phone number
  • Unbind the MFA email

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.