# Custom database not being checked

**URL:** <https://community.auth0.com/t/custom-database-not-being-checked/46858>\
**Category:** Get Help\
**Tags:** custom-database\
**Created:** [July 24, 2020, 3:57pm UTC](https://community.auth0.com/t/custom-database-not-being-checked/46858 "2020-07-24T15:57:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![codavis](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/codavis/32/18344_2.png) [@codavis](https://community.auth0.com/u/codavis)\
**Post date:** [July 24, 2020, 3:57pm UTC](https://community.auth0.com/t/custom-database-not-being-checked/46858/1 "2020-07-24T15:57:12Z")

</div>

I have enabled a custom database on my tenant, toggled on “Import Users to Auth0” and “Use my own database”, and I’ve connected the app that should use it.  
I’ve added scripts for Login and GetUser, and the scripts succeed when I test. I’ve used the “Try” option, and the also succeeds.  
But when I attempt to log in to the web application with a user who is in the legacy database but not in Auth0, I get a “Wrong email or password” error, and no logs in my custom database that indicate Auth0 attempted to connect to it.  
Is there an additional setting I’m missing to force Auth0 to use the custom database as the backup?

---

<div class="post-metadata">

**Author:** ![sgo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sgo/32/13789_2.png) [@sgo](https://community.auth0.com/u/sgo)\
**Post date:** [July 27, 2020, 4:04pm UTC](https://community.auth0.com/t/custom-database-not-being-checked/46858/3 "2020-07-27T16:04:09Z")

</div>

Heya @codavis,

It sounds like you’ve configured things correctly, I would recommend installing the [Realtime Webtasks extension](https://auth0.com/docs/extensions/realtime-webtask-logs) and adding console.log debugging lines into your scripts to help see what is going on during the flow.

There may be something behaving not as expected in the script throwing the error, or a conflict with rules/hooks if you have any enabled.

If the Custom DB scripts aren’t being called, I would recommend checking you don’t have more than one database enabled for the app, as Auth0 may be defaulting to another database - please see here for some more details if you need to have more than one database connection enabled for the app: [Select from Multiple Connection Options](https://auth0.com/docs/libraries/lock/v11/selecting-the-connection-for-multiple-logins)

---

<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:** [August 11, 2020, 4:04pm UTC](https://community.auth0.com/t/custom-database-not-being-checked/46858/4 "2020-08-11T16:04:11Z")

</div>

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