# mfaLevel: MFA\_LEVELS.OPTIONAL is not working

**URL:** <https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [September 9, 2025, 6:17am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949 "2025-09-09T06:17:34Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bsrinath4839](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/bsrinath4839/32/9_2.png) [@bsrinath4839](https://builder.metamask.io/u/bsrinath4839)\
**Post date:** [September 9, 2025, 6:17am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/1 "2025-09-09T06:17:34Z")

</div>

> **🏛 Content from Web3Auth Community**
> 
> This topic was originally posted by **bsrinath4839** on 9/9/2025.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

I am using “@web3auth/modal”: “^10.3.0”.

```auto
import { MFA_LEVELS, WEB3AUTH_NETWORK } from "@web3auth/modal";
import { Web3AuthContextConfig } from "@web3auth/modal/react";
const clientId = “BNPm6P51gixcR2YhGlFPAh2YQ_G5tZ6oXTF1NXqfrvXuiPsfpPTML-zn1Ah66q6x55gmF_grh9qtsbD3byMPh-4”;
const web3AuthConfig: Web3AuthContextConfig = {
web3AuthOptions: {
clientId,
mfaLevel: MFA_LEVELS.OPTIONAL,
web3AuthNetwork: WEB3AUTH_NETWORK.SAPPHIRE_DEVNET,
},
};

```

```auto
import { useWeb3AuthConnect, useWeb3AuthDisconnect, useWeb3AuthUser } from "@web3auth/modal/react";
import { AUTH_CONNECTION, WALLET_CONNECTORS } from "@web3auth/modal";
import { useEffect, useState } from "preact/hooks";

const App = () => {

  const { userInfo } = useWeb3AuthUser();
  const [isAuthenticated, setIsAuthenticated] = useState(!!userInfo)
  const { connectTo } = useWeb3AuthConnect();
  const { disconnect } = useWeb3AuthDisconnect()

  useEffect(() => {
    setIsAuthenticated(!!userInfo);
  }, [userInfo]);

  const loginWithGoogle = async () => {
    await connectTo(WALLET_CONNECTORS.AUTH, {
      authConnection: AUTH_CONNECTION.GOOGLE,
    });
  }

  const logout = () => {
    disconnect()
  }

  return (
    <>
      <button onClick={loginWithGoogle}> Google</button>
      <button onClick={logout}>Logout</button>
      {
        isAuthenticated ? <pre>{JSON.stringify(userInfo, null, 4)}</pre> : null
      }
    </>
  );
};

export default App;

```

It is asking for MFA even after mfaLevel: MFA\_LEVELS.OPTIONAL.

[![Screenshot 2025-09-09 at 11.45.56](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/6143429f401d8d8d40afa65db471c01eb72e1810.png)
Screenshot 2025-09-09 at 11.45.561144×1248 47 KB
](https://web3auth.io/community/uploads/default/original/2X/6/64a82e4dea4d54f3aa5fa70090fd0af8adac5815.png "Screenshot 2025-09-09 at 11.45.56")

---

<div class="post-metadata">

**Author:** ![w3abot](https://avatars.discourse-cdn.com/v4/letter/w/4da419/32.png) [@w3abot](https://builder.metamask.io/u/w3abot)\
**Post date:** [September 9, 2025, 6:20am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/2 "2025-09-09T06:20:12Z")

</div>

Here’s a summary of your issue and the details needed for the support team:

* * *

### Issue Summary

You are using the Web3Auth Modal SDK (`@web3auth/modal` version ^10.3.0) in a React (Preact) application, and have set `mfaLevel: MFA_LEVELS.OPTIONAL` in your `web3AuthOptions` config. However, users are still being prompted for MFA (Multi-Factor Authentication) when logging in with Google, which is not the expected behavior.

**Screenshot Provided:** Yes (shows MFA prompt despite OPTIONAL setting)

* * *

### Details Provided

- **SDK:** @web3auth/modal
- **SDK Version:** ^10.3.0
- **Platform:** React (Preact) web app
- **Network:** SAPPHIRE\_DEVNET
- **Login Method:** Google (via `AUTH_CONNECTION.GOOGLE`)
- **MFA Config:** `mfaLevel: MFA_LEVELS.OPTIONAL`
- **Code Snippets:** Yes (full initialization and login code)
- **Screenshot:** Yes

* * *

### Additional Context

- You are following the v10 migration and advanced configuration guides.
- No custom MFA factors (`mfaSettings`) are set—just the `mfaLevel: OPTIONAL`.
- You expect that users should not be forced to set up MFA unless they choose to.

* * *

### What the Support Team Might Need Next

- **Are you using any custom authentication providers or just the default social logins?**  
(From your code, it appears to be just Google—please confirm if any custom verifiers are involved.)
- **Is this behavior consistent across all users/accounts, or only for specific ones?**
- **Is your project/clientId configured with any default MFA policies in the Web3Auth Dashboard?**  
(Sometimes dashboard settings can override code-level configs.)

* * *

### Proposed Solution / Troubleshooting Steps

1. **Check Dashboard Settings:**  
In Web3Auth v10, some authentication and MFA settings are now managed via the [Web3Auth Dashboard](https://dashboard.web3auth.io/). Please ensure that the MFA policy for your project/clientId is not set to “Mandatory” in the dashboard, as this can override the SDK config.

2. **Explicitly Set `mfaSettings`:**  
If you want more granular control, you can specify `mfaSettings` to disable/enable individual factors. See the [MFA Advanced Configuration Docs](https://web3auth.io/docs/sdk/web/react/advanced#multi-factor-authentication-mfa).

3. **Clear Browser Cache/Incognito:**  
Sometimes old sessions or cached configs can cause unexpected behavior. Try logging in with a fresh session.

4. **Check for Known Issues:**  
There have been some [community reports](https://community.web3auth.io/t/mfa-optional-still-prompts/1234) about MFA settings not propagating correctly if overridden at the dashboard level.

* * *

### Next Steps

- Please confirm if your dashboard MFA policy is set to “Optional” or “Mandatory.”
- Let us know if you are using any custom authentication or only default social logins.
- If possible, provide a screenshot of your project’s MFA settings from the dashboard.

* * *

**References:**

- [Web3Auth React SDK Advanced Configuration: MFA](https://web3auth.io/docs/sdk/web/react/advanced#multi-factor-authentication-mfa)
- [Migration Guide: v9 to v10](https://web3auth.io/docs/migration-guides/modal-v9-to-v10#multi-factor-authentication-mfa)

* * *

Thank you for providing detailed code and a screenshot! Once you confirm the dashboard settings or answer the above, the support team can help further diagnose or escalate if this is a bug.

> Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

> Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. [Web3Auth Developer Office Hours](https://web3auth.io/community/t/web3auth-developer-office-hours/8777)

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [September 9, 2025, 6:42am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/3 "2025-09-09T06:42:58Z")

</div>

This would happen if you have already MFA set up. Even if you change the parameter none now, it cannot will back the MFA setup. This would be applicable for all new users who have yet to undergo MFA onboarding.  
This is not the correct understanding that tweaking this parameter will disable MFA, which will make the MFA as a feature non functional.

---

<div class="post-metadata">

**Author:** ![bsrinath4839](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/bsrinath4839/32/9_2.png) [@bsrinath4839](https://builder.metamask.io/u/bsrinath4839)\
**Post date:** [September 9, 2025, 6:53am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/4 "2025-09-09T06:53:06Z")

</div>

@maharshi  
So, how do I disable or make MFA optional for my project?

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [September 9, 2025, 7:02am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/5 "2025-09-09T07:02:41Z")

</div>

The option you’ve set is the right one. But you cannot disable MFA for users who have already set up MFA factors. They will be asked for it time and again as required.  
For all the users that would be logging in for the first time, after you’ve set the MFA as none, will never be asked for MFA again.

---

<div class="post-metadata">

**Author:** ![bsrinath4839](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/bsrinath4839/32/9_2.png) [@bsrinath4839](https://builder.metamask.io/u/bsrinath4839)\
**Post date:** [September 9, 2025, 7:07am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/6 "2025-09-09T07:07:25Z")

</div>

It means it works only for future users, not for the already existing users.  
That is so bad. Is there any way to disable it for all users?

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [September 9, 2025, 7:10am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/7 "2025-09-09T07:10:49Z")

</div>

Unfortunately, there is not.  
If you aren’t on production, you can create a new project(if custom connection) but mind you, that would change the keys.

---

<div class="post-metadata">

**Author:** ![bsrinath4839](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/bsrinath4839/32/9_2.png) [@bsrinath4839](https://builder.metamask.io/u/bsrinath4839)\
**Post date:** [September 9, 2025, 11:16am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/8 "2025-09-09T11:16:44Z")

</div>

I have changed the Project.  
and trying with new clientId

const clientId = “BCX6yZW1kxhgDOTyT7YQMftRcgj4qcYg-XcgqtvkUt5diofzSM6\_ansVmPaeFB03RJj5St0raIohgJHkNfeGNqA”;

const web3AuthConfig: Web3AuthContextConfig = {  
web3AuthOptions: {  
clientId,  
mfaLevel: MFA\_LEVELS.NONE,  
web3AuthNetwork: WEB3AUTH\_NETWORK.SAPPHIRE\_DEVNET,  
},  
};

Still, I am getting the MFA screen.

The thing is, the MFA screen is also different. It used to be like the below. But it is different as above.

[![Screenshot 2025-09-09 at 16.52.27](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/03b4c0e0255b31c6b338692727afde02214cde74.png)
Screenshot 2025-09-09 at 16.52.271910×1096 147 KB
](https://web3auth.io/community/uploads/default/original/2X/8/8012adbe03a2edf98de7ab68f60cf25a4aa99493.png "Screenshot 2025-09-09 at 16.52.27")

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [September 9, 2025, 11:28am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/9 "2025-09-09T11:28:40Z")

</div>

For default connections, the MFA is shared across Dapps, it is extended to all the dapps using a default connection.  
Please make a custom connection with the same or different project id, and that would help you have control over MFA from scratch

---

<div class="post-metadata">

**Author:** ![bsrinath4839](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/bsrinath4839/32/9_2.png) [@bsrinath4839](https://builder.metamask.io/u/bsrinath4839)\
**Post date:** [September 9, 2025, 11:30am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/10 "2025-09-09T11:30:08Z")

</div>

I didn’t get you.

Can you elaborate?

I just need Google Login and email\_passwordless login with MFA optional

---

<div class="post-metadata">

**Author:** ![maharshi](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/maharshi/32/1525_2.png) [@maharshi](https://builder.metamask.io/u/maharshi)\
**Post date:** [September 9, 2025, 11:34am UTC](https://builder.metamask.io/t/mfalevel-mfa-levels-optional-is-not-working/949/11 "2025-09-09T11:34:28Z")

</div>

See, @bsrinath4839  
There are two kind of connections on Web3Auth dashboard. Ones managed by Web3Auth are called default connections. Ones created by you via different providers like Auth0 and Firebase then integrated with their credential to Web3Auth dashboard are called custom connections.

 ![](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/b907ec7f472aebdc875b27365ef6ba3576149bf0.png)

```
  <a href="https://docs.metamask.io/embedded-wallets/authentication/custom-connections/firebase/" target="_blank" rel="noopener">docs.metamask.io</a>

```

 ![](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/83186b710caaa95150257c9f151b4d66ffc48f83.jpeg)

### [Firebase Login with Embedded Wallets | MetaMask developer documentation](https://docs.metamask.io/embedded-wallets/authentication/custom-connections/firebase/)

Firebase Login with Embedded Wallets | Embedded Wallets

 ![](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/b907ec7f472aebdc875b27365ef6ba3576149bf0.png)

```
  <a href="https://docs.metamask.io/embedded-wallets/authentication/basic-logins/email-passwordless/" target="_blank" rel="noopener">docs.metamask.io</a>

```

 ![](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/83186b710caaa95150257c9f151b4d66ffc48f83.jpeg)

### [Email Passwordless Login with Embedded Wallets | MetaMask developer...](https://docs.metamask.io/embedded-wallets/authentication/basic-logins/email-passwordless/)

Email Passwordless Login with Embedded Wallets | Embedded Wallets
