# MFA not required even though factor is enabled?

**URL:** <https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009>\
**Category:** Get Help\
**Tags:** mfa-prompt-classic-experience, mfa\
**Created:** [March 17, 2025, 10:14pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009 "2025-03-17T22:14:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnwp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/johnwp/32/26939_2.png) [@johnwp](https://community.auth0.com/u/johnwp)\
**Post date:** [March 17, 2025, 10:14pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/1 "2025-03-17T22:14:35Z")

</div>

We’re on the B2C Essentials plan. We have “One-time Password” enabled under “Security \> Multi-factor Auth”, but new users logging in for the first time no longer seem to be required to use it. Is there another setting somewhere I’m missing that enforces the requirement of this factor?

 ![Screenshot 2025-03-17 at 5.07.38 PM](https://global.discourse-cdn.com/auth0/original/3X/f/3/f36c8c49d2f22cd22ad4c2e35ad790fc36b2cc1d.png)

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 17, 2025, 10:36pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/3 "2025-03-17T22:36:04Z")

</div>

HI @johnwp

Welcome back to the Auth0 Community!

Have you set your **Require Multi-factor Auth** policy to **Always**?

If not, what is the policy set and how are you enforcing MFA for your users?

Do you customize the MFA using actions?

Looking forward to your answer!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![johnwp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/johnwp/32/26939_2.png) [@johnwp](https://community.auth0.com/u/johnwp)\
**Post date:** [March 17, 2025, 10:39pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/4 "2025-03-17T22:39:32Z")

</div>

I seem to have missed that setting. I have it enabled now. Thanks for the tip!

---

<div class="post-metadata">

**Author:** ![johnwp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/johnwp/32/26939_2.png) [@johnwp](https://community.auth0.com/u/johnwp)\
**Post date:** [March 17, 2025, 10:57pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/5 "2025-03-17T22:57:58Z")

</div>

@nik.baleca If I wanted to only require MFA for one application, would I do that as a custom action?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 17, 2025, 11:01pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/6 "2025-03-17T23:01:06Z")

</div>

Hi again.

Yes! Your action would look something like this:

```auto
exports.onExecutePostLogin = async (event, api) => {

  if(event.client.client_id === 'YOUR_CLIENT_ID') {
    api.multifactor.enable('any');
  }

};

```

---

<div class="post-metadata">

**Author:** ![johnwp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/johnwp/32/26939_2.png) [@johnwp](https://community.auth0.com/u/johnwp)\
**Post date:** [March 17, 2025, 11:36pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/7 "2025-03-17T23:36:01Z")

</div>

When I enable that action, it goes into an infinite MFA loop. Any ideas on what’s happening?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 18, 2025, 12:00am UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/8 "2025-03-18T00:00:10Z")

</div>

I see.

Since you are looking to enable the MFA only for one application. I would recommend to set the MFA Policy to **Never** so that you can control it within the actions.

Once you set it to never, the action should prompt the users to enroll into MFA on signup or complete the challenge.

Let me know if you have any other issues!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![johnwp](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/johnwp/32/26939_2.png) [@johnwp](https://community.auth0.com/u/johnwp)\
**Post date:** [March 18, 2025, 3:13pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/9 "2025-03-18T15:13:25Z")

</div>

I ended up adding some additional code to prevent the infinite MFA loop. We seem to have lost the “Remember for 30 days” option on the MFA screen. Is there a way we can get that option back?

```auto
exports.onExecutePostLogin = async (event, api) => {
  if(event.client.client_id === event.secrets.clientId) {

    if (event.transaction?.protocol === "oauth2-refresh-token") {
      return;
    }

    const completedMfa = event.authentication?.methods.some(
      (method) => method.name === "mfa"
    );

    if (completedMfa) {
      return;
    }

    api.multifactor.enable('any');
  }
};

```

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 18, 2025, 3:53pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/10 "2025-03-18T15:53:53Z")

</div>

Hi,

You could try the following:

```auto
api.multifactor.enable('any', { allowRememberBrowser: true });

```

This will display the button on the screen for the user.

Let me know if I can help with anything else!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [April 1, 2025, 3:54pm UTC](https://community.auth0.com/t/mfa-not-required-even-though-factor-is-enabled/184009/11 "2025-04-01T15:54:03Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
