Use cases
- Wallet export. Require MFA before a user exports a private key or seed phrase.
- Large transfers. Require MFA above a set amount, and let small transfers through without it.
- Sensitive messages. Require MFA to sign specific messages, such as an ownership proof.
- Every action. Require MFA for every wallet action, and require every user to enroll.
Benefits
- Users complete MFA only for the actions your app’s policies select. Other actions don’t prompt for MFA.
- Privy enforces MFA alongside the user’s authentication credentials. Actions that require MFA need both a valid user session and a completed MFA verification.
- Client-side SDKs, like the React SDK, prompt users to enroll or verify, then retry the request. Server SDKs accept the MFA token in the authorization context.
How it works
Policy rules require MFA with theALLOW_WITH_MFA action. Each rule takes one of three actions:
When more than one rule matches a request, the action highest in this table applies. Privy denies a request that matches no rule.
1
The user authorizes a wallet action
The user signs the request with their user
key.
2
Privy evaluates the wallet's policies
Inside the enclave, Privy checks the request against every matching rule, and applies the action
that ranks highest in the table above.
3
Privy checks for MFA
If an
ALLOW_WITH_MFA rule matches, Privy allows the request only if the user key records an
unexpired MFA verification. Otherwise, it returns mfa_required or
missing_mfa_enrollment.4
The user completes MFA, and the request is retried
The user enrolls or verifies, and the request is retried with a user key that records the MFA.
The React SDK does this automatically. With a server SDK, see authorizing
actions.

