Documentation Index
Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
Use this file to discover all available pages before exploring further.
Summary
This hook provides a way for clients to check if MFA is required for an action.
The hook needs to be initialized within a child of DynamicContextProvider.
Usage
Available methods:
isMfaRequiredForAction: Check if MFA is required for an action. Returns a boolean value indicating whether MFA is required for the action.
Usage
import { useIsMfaRequiredForAction, MFAAction } from '@dynamic-labs/sdk-react-core';
const App = () => {
const isMfaRequiredForAction = useIsMfaRequiredForAction();
const handleCheckMfaRequiredForAction = async () => {
const isMfaRequired = await isMfaRequiredForAction({
mfaAction: MFAAction.WalletWaasSign, // Specify action configured for Action-Based MFA
});
console.log('MFA is required for action:', isMfaRequired);
};
return (
<button
onClick={() => handleCheckMfaRequiredForAction()}
>
Check if MFA is required for an action
</button>
);
};