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

    • User Authentication Module

    • Management Module

      • Management user
      • Management application
      • Management role
      • Manage resources and permissions
      • Management groups
      • Management organization
      • Management User Custom Fields
      • Management registration white list
      • Management user pool configuration
      • Management MFA
      • Management subject certification
  • Java / Kotlin

  • Python

  • C#

  • PHP

  • Go

  • Ruby
  • Android

  • iOS

  • Flutter

  • React Native
  • WeChat Mini Program
  • WeChat webpage authorization
  • Framework Integration
  • Error code
  1. Development Integration
  2. /
  3. JavaScript/Node.js
  4. /
  5. Management Module
  6. /
  7. Management MFA

¶ Management MFA

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

This module is primarily used to manage MFA-related operations.

Please use the module in the following ways:

import { ManagementClient } from 'authing-js-sdk'

const managementClient = new ManagementClient({
  userPoolId: 'YOUR_USERPOOL_ID',
  secret: 'YOUR_USERPOOL_SECRET',
})
managementClient.mfa.getStatus(USER_ID) // User MFA Binding Status

¶ Get user MFA binding status

managementClient.mfa.getStatus(userId)

Get user MFA binding status

¶ parameter

  • userId <string> user ID

¶ Example

managementClient.mfa.getStatus(USER_ID)

¶ Sample data

{
  "FACE": true,
  "OTP": false
}

¶ Unfounded user MFA

managementClient.mfa.unAssociateMfa(userId, mfaType)

Unfounded user MFA

¶ parameter

  • userId <string> user ID
  • mfaType <string> Melting type, optional value FACE, OTP

¶ Example

managementClient.mfa.unAssociateMfa(USER_ID, 'OTP')

¶ Sample data

true

¶ Import existing TOTP keys to Authing

managementClient.mfa.importTotp(userId, secret, recoveryCode)

Import existing TOTP keys to Authing and enable TOTP MFA for users. Suitable for the scene: The business system has an MFA system that users have bind MFA in the original system, and now I hope to migrate the user's MFA authenticator to Authing.

¶ parameter

  • userId <string> user ID
  • secret <string> TOTP Key
  • recoveryCode <string> Restore code, you can log in with recovery code when you lose TOTP

¶ Example

managementClient.mfa.importTotp('USER_ID', 'SECRET', 'RECOVERY_CODE')

¶ Sample data

{
    userId: '60ae0cf98370aa285819af72',
    enable: true,
    secret: 'XXXXXXXXXXXXX',
    authenticatorType: 'totp',
    recoveryCode: 'xxxx-xxxx-xxxx-xxxx-xxxx-xxxx',
    createdAt: '2021-05-26T09:53:37.268Z',
    updatedAt: '2021-05-26T09:53:37.268Z',
    id: '60ae1aa11d63d248ee25a895',
}
Prev: Management user pool configuration Next: Management subject certification
  • Get user MFA binding status
  • Unfounded user MFA
  • Import existing TOTP keys to Authing

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.