Parameters
| Parameter | Type | Description |
|---|---|---|
props | EnrollMfaProps | The props for the component. |
Returns
Element
The rendered component.
function EnrollMfa(props: EnrollMfaProps): Element;
| Parameter | Type | Description |
|---|---|---|
props | EnrollMfaProps | The props for the component. |
Element
The rendered component.
// Default usage
<EnrollMfa onEnrollSuccess={() => console.log("Enrolled!")} />
// With custom UI
<EnrollMfa onEnrollSuccess={onEnrollSuccess}>
{(state) => (
<>
<h1>{state.step === "list" ? "Multi-factor authentication" : "Add new method"}</h1>
<EnrollMfaTitle />
<EnrollMfaDescription />
{state.step === "list" && <EnrollMfaError />}
<EnrollMfaFlow />
</>
)}
</EnrollMfa>
Was this page helpful?