# How to enable 2fa options when enabling it via rules

**URL:** <https://community.auth0.com/t/how-to-enable-2fa-options-when-enabling-it-via-rules/118002>\
**Category:** Get Help\
**Tags:** mfa\
**Created:** [October 6, 2023, 4:41pm UTC](https://community.auth0.com/t/how-to-enable-2fa-options-when-enabling-it-via-rules/118002 "2023-10-06T16:41:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tech20](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@tech20](https://community.auth0.com/u/tech20)\
**Post date:** [October 6, 2023, 4:41pm UTC](https://community.auth0.com/t/how-to-enable-2fa-options-when-enabling-it-via-rules/118002/1 "2023-10-06T16:41:41Z")

</div>

Hey, I’m trying to implement something on my app where a few users don’t need to use 2fa and the rest does.

I got that working using a rule with the following code:

```auto
api.multifactor.enable("any", { allowRememberBrowser: false })

```

The issue is that this will pick one of the providers and not let the user decide which one they want to use, which is the case when I don’t enable it via a rule as I have that option enabled.

Is there a way to force 2fa via rule but let the user pick the provider instead?

Thanks!

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [October 6, 2023, 4:58pm UTC](https://community.auth0.com/t/how-to-enable-2fa-options-when-enabling-it-via-rules/118002/3 "2023-10-06T16:58:25Z")

</div>

Hi @tech20,

Welcome to the Auth0 Community!

First, let me clarify that the `api.multifactor.enable()` method is actually meant for Actions and not Rules. See [this reference](https://auth0.com/docs/customize/actions/flows-and-triggers/login-flow/api-object#:~:text=api.multifactor.enable(provider%2C%20options)) for clarity.

> [@tech20](#):
>
> Is there a way to force 2fa via rule but let the user pick the provider instead?

Yes, to do so you will need to go to your [_Auth0 Dashabord \> Security \> Multi-factor Auth_](https://manage.auth0.com/#/security/mfa) and scroll to the bottom of the page to enable the **Show Multif-factor Authentication Options** feature:

 ![image](https://global.discourse-cdn.com/auth0/original/3X/a/e/aecb957a5ebef12f2ffc9af6285a8a2cc8680a8e.png)  
(Reference: [Enable Multi-Factor Authentication](https://auth0.com/docs/secure/multi-factor-authentication/enable-mfa#:~:text=In%20the%20Additional%20Settings%20section%2C%20locate%20the%20Show%20Multi%2Dfactor%20Authentication%20options%20setting.))

Please let me know how this goes for you.

Thanks,  
Rueben

---

<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:** [October 20, 2023, 4:58pm UTC](https://community.auth0.com/t/how-to-enable-2fa-options-when-enabling-it-via-rules/118002/4 "2023-10-20T16:58:37Z")

</div>

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