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

  • Flutter

    • Quick start
    • APIs

      • Authentication
      • OIDC
      • MFA
      • Scan to login
    • Social login
    • On-premise
  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. Flutter
  4. /
  5. APIs
  6. /
  7. MFA

¶ MFA API

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

¶ MFA check

Checks if a given phone or email can be used for MFA

static Future<bool> mfaCheck(String? phone, String? email) async

params

  • phone phone number to check. Can be null
  • email email address to check. Can be null

example

bool r1 = await AuthClient.mfaCheck("188xxxx8888", null);
bool r2 = await AuthClient.mfaCheck(null, "abc@gmail.com");

¶ MFA verify by phone

MFA by SMS verification code sent to phone

static Future<AuthResult> mfaVerifyByPhone(String phone, String code) async

params

  • phone phone number
  • code SMS verification code

example

AuthResult result = await AuthClient.mfaVerifyByPhone("188xxxx8888", "1234");

¶ MFA verify by email

MFA by email verification code

static Future<AuthResult> mfaVerifyByEmail(String email, String code) async

params

  • email email address
  • code email verification code

example

AuthResult result = await AuthClient.mfaVerifyByEmail("1@gmail.com", "1234");

¶ MFA verify by TOTP

MFA by TOTP (Time-based One Time Password) code. User must firstly bound with TOTP.

static Future<AuthResult> mfaVerifyByTOTP(String code) async

params

  • code TOTP code

example

AuthResult result = await AuthClient.mfaVerifyByTOTP("1234");

¶ MFA verify by recovery code

MFA by recovery code which should be safely stored after first time bound with TOTP. Note after successful MFA via this method, the recovery code will be refreshed and returned by this method. User should again safely store the new recovery code.

static Future<AuthResult> mfaVerifyByRecoveryCode(String code) async

params

  • code recovery code

example

AuthResult result = await AuthClient.mfaVerifyByRecoveryCode("1234");

Prev: OIDC Next: Scan to login
  • MFA check
  • MFA verify by phone
  • MFA verify by email
  • MFA verify by TOTP
  • MFA verify by recovery code

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.