Skip to main content
Build custom MFA flows that match your app’s design and user experience. Custom UIs give your app complete control over how users enroll in and verify MFA.
If you are using the React or React Native SDK, you can optionally use Privy’s default UIs for MFA instead of building custom flows.

When to use custom UIs

Custom MFA UIs are appropriate when your app:
  • Uses an SDK other than React or React Native (Swift, Android, Flutter, Unity)
  • Requires a fully branded MFA experience that matches your app’s design system
  • Needs custom flows or logic around MFA enrollment and verification
  • Integrates with existing authentication UIs in your app

Getting started

Building a custom MFA experience involves three main areas:

Enrollment

Allow users to enroll in MFA with SMS, TOTP, or passkeys

Verification

Guide users through completing MFA when required

MFA required listener

Know when MFA is required and trigger your custom UI

Additional resources

Unenrollment

Allow users to remove enrolled MFA methods

Error handling

Handle errors during MFA flows

Default UI

Use Privy’s built-in MFA UI instead