# Specify Specific MFA Factor

**URL:** <https://community.auth0.com/t/specify-specific-mfa-factor/106283>\
**Category:** Get Help\
**Tags:** mfa-api, mfa\
**Created:** [May 5, 2023, 7:53pm UTC](https://community.auth0.com/t/specify-specific-mfa-factor/106283 "2023-05-05T19:53:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dfleming](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dfleming/32/42432_2.png) [@dfleming](https://community.auth0.com/u/dfleming)\
**Post date:** [May 5, 2023, 7:53pm UTC](https://community.auth0.com/t/specify-specific-mfa-factor/106283/1 "2023-05-05T19:53:57Z")

</div>

Given the code as a Login rule…

```auto
function multifactorAuthentication(user, context, callback) {
  if (context.clientID === configuration.WEB_SITE_APP_ID || 
     context.clientID === configuration.NATIVE_APP_ID) {
    context.multifactor = {
      provider: 'any',
      allowRememberBrowser: false
    };
  }

  callback(null, user, context);
}

```

Instead of `provider: 'any'` I’d like to specify specific factors e.g. ‘One Time Password’, ‘Email’, or ‘Recovery Code’ based on user.metadata. Is this possible?

This article indicated to me that `any, guardian, google-authenticator, duo` are the only options. [Customize Multi-Factor Authentication Pages (auth0.com)](https://auth0.com/docs/secure/multi-factor-authentication/customize-mfa#use-rules)

---

<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:** [May 5, 2023, 11:28pm UTC](https://community.auth0.com/t/specify-specific-mfa-factor/106283/3 "2023-05-05T23:28:41Z")

</div>

Hi @dfleming,

Thanks for reaching out to the Auth0 Community!

> [@dfleming](#):
>
> Instead of `provider: 'any'` I’d like to specify specific factors e.g. ‘One Time Password’, ‘Email’, or ‘Recovery Code’ based on user.metadata. Is this possible?

Unfortunately, this is not possible. The only available MFA providers include `any`, `guardian`, `google-authenticator`, and `duo` as you have found.

With that, I recommend that you [create a feedback request](https://community.auth0.com/c/feedback/95) asking to support enforcing a specific MFA factor using Rules.

For now, one possible workaround would be to enable only one MFA factor for your current tenant with your App. Then if other factors are needed, you could use an alternative tenant.

Please let me know if you have any additional questions.

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:** [May 19, 2023, 11:29pm UTC](https://community.auth0.com/t/specify-specific-mfa-factor/106283/4 "2023-05-19T23:29:08Z")

</div>

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