Skip to main content

enableMFA

Function to enable Multi-Factor Authentication (MFA) for users with Web3Auth.

ge

try {
await web3auth.enableMFA()
console.log('MFA setup process initiated')
} catch (error) {
console.error('Error enabling MFA:', error)
}

Interface

enableMFA<T>(loginParams?: T): Promise<void>;

loginParams

Optional parameters for the login process when setting up MFA.

Return Value

Promise<void>

A promise that resolves when the MFA setup process has been initiated. This function will trigger a redirect to the MFA setup page, where the user will be asked to login again and set up the MFA methods according to the configuration set in the Web3Auth instance.

On this page