Skip to main content

Recommended: JavaScript SDK for React Native

While this SDK is still supported, we recommend using newer JavaScript SDK, which is optimized for React Native, but also comes with a host of other benefits.
Action-Based MFA requires users to verify their identity for sensitive actions like transactions. By default, we only require action-based MFA once the user already has a MFA method registered.

Dashboard Setup

Configure Action-Based MFA in the dashboard before implementing in your application. See End-User MFA Configuration - Action-Based MFA for dashboard setup instructions.

Events that trigger Action-Based MFA

  • Waas Export - When exporting a private key on an MPC wallet.
  • Waas Refresh - When a wallet is delegated, or when a user claims a pregenerated MPC wallet for the first time.
  • WaaS Sign - When any signature is performed i.e. a message, a transaction, typed data, authorization, etc.
  • WaaS Reshare - When a wallet is approved or revoked from delegated access and the user next signs in.

Your UI SDK Implementation

  • Check requirement: Use client.mfa.isRequiredForAction() for the specific action.
    • Create token: If required, collect OTP and call client.mfa.authenticateDevice({ code, createMfaToken }).
    • Perform action: Token is applied automatically after creation.
    • Only one verified TOTP device per user (device management applies across modes).
    • Recovery codes are single-use; regenerate with client.mfa.getNewRecoveryCodes() if exhausted.
    Troubleshooting
    • Error: “MFA required” despite prompting — ensure you authenticate before performing the action.
    • Token unexpectedly missing — tokens expire with session; create a new token when needed.

Dynamic UI Implementation

The React Native SDK provides a UI method to prompt MFA authentication. Use client.mfa.isRequiredForAction() to check if MFA is required, then use client.ui.mfa.show() to prompt the user. Note: The Dynamic UI is method-agnostic. It automatically prompts with whichever MFA method(s) you have enabled (TOTP only for React Native).
Note: For Action-Based MFA in React Native, only TOTP authentication is currently supported. Passkey MFA is not available in React Native.
Last modified on July 24, 2026