ConstBasic usage:
import { UserMFAMgmt } from '@auth0/universal-components-react';
function MyAccountPage() {
return <UserMFAMgmt />;
}
With event handlers and configuration:
<UserMFAMgmt
showActiveOnly={true}
factorConfig={{
sms: { visible: true, enabled: true },
email: { visible: true, enabled: true },
}}
onEnroll={() => toast.success('Factor enrolled!')}
onDelete={() => toast.success('Factor deleted!')}
onErrorAction={(error, action) => {
console.error(`MFA ${action} failed:`, error);
}}
/>
UserMFAMgmtProps for all available props
UserMFAMgmt - Multi-Factor Authentication Management Component
A ready-to-use block component for managing Multi-Factor Authentication (MFA) factors. This component provides a complete UI for users to view, enroll, and delete MFA factors including SMS, email, authenticator apps, push notifications, and recovery codes.
The component automatically handles: