Manage MFA
The manageMFA method is used to trigger manage MFA flow for users, allowing users to update their MFA settings. The method takes LoginParams which will be used during custom auth connections. If you are using default login providers, you don't need to pass LoginParams. If you are using custom JWT auth connections, you need to pass the JWT token in LoginParams as well.
Usage
- Default Auth Connection
- Custom JWT Auth Connection
do {
let response = try await web3Auth.manageMFA()
if response {
// Handle success
} else {
// Something went wrong
}
} catch {
// Handle error
}
let loginParams = LoginParams(
authConnection: .CUSTOM,
authConnectionId: "your-auth-connection-id",
idToken: "your_jwt_token"
)
do {
let response = try await web3Auth.manageMFA(loginParams)
if response {
// Handle success
} else {
// Something went wrong
}
} catch {
// Handle error
}