# <TaskSetupMFA /> component

![The <TaskSetupMFA /> component renders a UI for resolving the setup-mfa session task.](https://clerk.com/docs/raw/_public/images/ui-components/task-setup-mfa.png){{ style: { maxWidth: '460px' } }}

The `<TaskSetupMFA />` component renders a UI for resolving the `setup-mfa` session task. You can further customize your `<TaskSetupMFA />` component by passing additional [properties](https://clerk.com/docs/nextjs/reference/components/authentication/task-setup-mfa.md#properties) at the time of rendering.

> The `<TaskSetupMFA/>` component cannot render when a user doesn't have current session tasks.

## When to use `<TaskSetupMFA />`

Clerk's sign-in flows, such as the [Sign-in Account Portal page](https://clerk.com/docs/guides/account-portal/overview.md?sdk=nextjs#sign-in), [<SignInButton />](https://clerk.com/docs/nextjs/reference/components/unstyled/sign-in-button.md), and [<SignIn />](https://clerk.com/docs/nextjs/reference/components/authentication/sign-in.md) component, automatically handle the `setup-mfa` session task flow for you, including rendering the `<TaskSetupMFA />` component when needed.

If you want to customize the route where the `<TaskSetupMFA />` component is rendered or customize its appearance, you can host it yourself within your application.

## Example

The following example demonstrates how to host the `<TaskSetupMFA />` component on a custom page. You first need to [set the `taskUrls` option on your Clerk integration](https://clerk.com/docs/guides/configure/session-tasks.md?sdk=nextjs#using-the-task-urls-option) so that users are redirected to the page where you host the `<TaskSetupMFA />` component when they have a pending `setup-mfa` session task.

filename: app/layout.tsx
```tsx
import { ClerkProvider } from '@clerk/nextjs'

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        <ClerkProvider taskUrls={{ 'setup-mfa': '/session-tasks/setup-mfa' }}>
          {children}
        </ClerkProvider>
      </body>
    </html>
  )
}
```

filename: app/session-tasks/setup-mfa/page.tsx
```tsx
import { TaskSetupMFA } from '@clerk/nextjs'

export default function Page() {
  return <TaskSetupMFA redirectUrlComplete="/dashboard" />
}
```

## Properties

| Name                | Type                    | Description                                                                                         |
| ------------------- | ----------------------- | --------------------------------------------------------------------------------------------------- |
| redirectUrlComplete | string                  | The full URL or path to navigate to after successfully completing the task.                         |
| appearance?         | Appearance | undefined | An object to style your components. Will only affect Clerk components and not Account Portal pages. |

## Customization

To learn about how to customize Clerk components, see the [customization documentation](https://clerk.com/docs/nextjs/guides/customizing-clerk/appearance-prop/overview.md).

If Clerk's prebuilt components don't meet your specific needs or if you require more control over the logic, you can rebuild the existing Clerk flows using the Clerk API. For more information, see the [custom flow guides](https://clerk.com/docs/guides/development/custom-flows/overview.md?sdk=nextjs).

---

## Sitemap

[Overview of all docs pages](https://clerk.com/docs/llms.txt)
