Enable MFA for a user
The enableMFA
method is used to trigger MFA setup flow for users. The method takes LoginParams
which will used during custom verifiers. If you are using default login providers, you don't need to pass LoginParams
. If you are using custom jwt verifiers, you need to pass the JWT token in loginParams
as well.
Usage
- Default Verifier
- Custom JWT Verifier
Usage
try {
await Web3AuthFlutter.enableMFA();
} on UserCancelledException {
log("User cancelled.");
} catch(e) {
log("Unknown exception occurred");
}
Usage
try {
final loginParams = LoginParams(
loginProvider: Provider.jwt,
extraLoginOptions: ExtraLoginOptions(
id_token: "YOUR_JWT_TOKEN",
),
);
await Web3AuthFlutter.enableMFA(loginParams);
} on UserCancelledException {
log("User cancelled.");
} catch(e) {
log("Unknown exception occurred");
}