# Multifactor authentication per Database

**URL:** <https://community.auth0.com/t/multifactor-authentication-per-database/22452>\
**Category:** Get Help\
**Created:** [March 11, 2019, 9:46pm UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452 "2019-03-11T21:46:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alto](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alto/32/11703_2.png) [@alto](https://community.auth0.com/u/alto)\
**Post date:** [March 11, 2019, 9:46pm UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452/1 "2019-03-11T21:46:39Z")

</div>

Hi auth0,

is it possible to enable multi-factor authentication per Database? We have a multi-tenant architecture and split the users in different databases, so is it possible to enable it per database? Do you have API Endpoint for setup of the multi factor?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 11, 2019, 10:12pm UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452/2 "2019-03-11T22:12:37Z")

</div>

Hello @alto,

This may be what you are looking for:

> [@Prompt MFA based on user Meta Data](http://community.auth0.com/t/prompt-mfa-based-on-user-meta-data/13562/4):
>
> I think what you are looking for (conditional MFA) is documented in the two links below: [https://auth0.com/docs/multifactor-authentication/user-initiated-mfa](https://auth0.com/docs/multifactor-authentication/user-initiated-mfa)

---

<div class="post-metadata">

**Author:** ![alto](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/alto/32/11703_2.png) [@alto](https://community.auth0.com/u/alto)\
**Post date:** [March 11, 2019, 10:22pm UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452/3 "2019-03-11T22:22:00Z")

</div>

Hi @markd,

thank you for the fast reply.I found the link and it is useful. This answers the first part of my question. What about the setup of the MFA? How can I integrate the setup of the MFA in my single page application? Are there some tutorials for that?

---

<div class="post-metadata">

**Author:** ![markd](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/markd/32/38919_2.png) [@markd](https://community.auth0.com/u/markd)\
**Post date:** [March 12, 2019, 12:35am UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452/4 "2019-03-12T00:35:13Z")

</div>

I definitely don’t know much about SPAs, but I believe all the MFA ‘stuff’ is handled on Auth0’s side. I don’t think there is anything you need to do. I just set up a new application with MFA enabled, and I downloaded and ran the React demo app. When I go to log in it asks for my MFA OTP code, and this is all happening at Auth0.

Here’s a [screen recording](https://www.dropbox.com/s/my8msom3cf9o5lc/Screen%20Recording%202019-03-11%20at%2020.58.06.mov?dl=0) of the interaction between the demo React SPA app and MFA. In this case I enabled the One Time Password MFA option, updated the MFA rule (automatically created when you enable MFA) to limit to force MFA on application I create for the SPA.

[https://dl.dropboxusercontent.com/s/my8msom3cf9o5lc/Screen%20Recording%202019-03-11%20at%2020.58.06.mov?dl=0](https://dl.dropboxusercontent.com/s/my8msom3cf9o5lc/Screen%20Recording%202019-03-11%20at%2020.58.06.mov?dl=0)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [August 30, 2019, 11:06am UTC](https://community.auth0.com/t/multifactor-authentication-per-database/22452/5 "2019-08-30T11:06:34Z")

</div>


