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

The manageMFA method opens the account dashboard where users can manage their multi-factor authentication (MFA) factors. It accepts an optional LoginParams parameter and returns true when the flow completes.

The SDK reuses the auth connection from the user's current session.

  • If you use a default sign-in provider, call manageMFA() without arguments.
  • If you use a custom auth connection that needs extra sign-in options (for example, Auth0), pass a LoginParams object with the same extraLoginOptions you used to sign in.
warning

The user must have MFA enabled. Otherwise, manageMFA throws Web3AuthError.mfaNotEnabled. Users who signed in with an idToken (single-factor authentication) can't manage MFA, and the method throws Web3AuthError.enabledMfaNotAllowed.

Usage​

do {
let response = try await web3Auth.manageMFA()
if response {
// Handle success
} else {
// Something went wrong
}
} catch {
// Handle error
}
On this page