For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Manage MFA settings

The manageMFA method opens a browser where the user can add, remove, and configure their MFA factors from the templated user interface.

The method takes optional LoginParams, the same as enableMFA. It returns a bool that indicates whether the flow completed. It throws if the user hasn't enabled MFA yet (MFA_NOT_ENABLED on Android, mfaNotEnabled on iOS).

Not available for idToken sessions

In v8, enableMFA and manageMFA throw when the current session was created with idToken (custom JWT sign-in such as Firebase), or when you pass LoginParams with idToken. On Android the error is ENABLE_MFA_NOT_ALLOWED; on iOS it's enabledMfaNotAllowed. Users who signed in with an OAuth flow, including custom connections configured with authConnectionConfig and ExtraLoginOptions, can use MFA.

Usage​

try {
final bool result = await Web3AuthFlutter.manageMFA();
} on PlatformException catch (e) {
log(e.message ?? e.toString());
}
On this page