> ## Documentation Index
> Fetch the complete documentation index at: https://docs-staging-quickstart-revamp.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Learn about authenticating users using your database as an identity provider.

# Custom Database Connections

Use a custom database connection when you want to provide Auth0 with access to your own independent (legacy) identity data store primarily for authentication (filling the role of an <Tooltip tip="Identity Provider (IdP): Service that stores and manages digital identities." cta="View Glossary" href="/docs/glossary?term=identity+provider">identity provider</Tooltip>) and for migrating user data to Auth0's data store.

Auth0 [Extensibility](/docs/customize/extensions) allows you to add custom logic to build out last-mile solutions for Identity and Access Management (IdAM). Auth0 extensibility comes in several forms: [Actions](/docs/customize/actions), [Rules](/docs/customize/rules), [Hooks](/docs/customize/hooks), and [scripts](/docs/authenticate/database-connections/custom-db/templates) for both custom database connections and custom database migration. Each is implemented using [Node.js](https://nodejs.org/en/) running on the Auth0 platform in an Auth0 tenant.

Auth0 extensibility executes at different points in the IdAM pipeline:

* **Actions** extend processes called flows, which are made up of one or more triggers, and which represent the logical pipeline through which information moves during a single point in the Auth0 journey. To learn more about available flows and triggers, read [Explore Flows and Triggers](/docs/customize/actions/explore-triggers).
* **Rules** run when artifacts for user authenticity are generated (i.e., an <Tooltip tip="ID Token: Credential meant for the client itself, rather than for accessing a resource." cta="View Glossary" href="/docs/glossary?term=ID+Token">ID Token</Tooltip> in <Tooltip tip="ID Token: Credential meant for the client itself, rather than for accessing a resource." cta="View Glossary" href="/docs/glossary?term=OpenID">OpenID</Tooltip> Connect (OIDC)), an <Tooltip tip="Security Assertion Markup Language (SAML): Standardized protocol allowing two parties to exchange authentication information without a password." cta="View Glossary" href="/docs/glossary?term=Access+Token">Access Token</Tooltip> in <Tooltip tip="Access Token: Authorization credential, in the form of an opaque string or JWT, used to access an API." cta="View Glossary" href="/docs/glossary?term=OAuth+2.0">OAuth 2.0</Tooltip>, or an assertion in <Tooltip tip="OAuth 2.0: Authorization framework that defines authorization protocols and workflows." cta="View Glossary" href="/docs/glossary?term=Security+Assertion+Markup+Language">Security Assertion Markup Language</Tooltip> (SAML).
* **Hooks** provide additional extensibility for when there is an exchange of non-user related artifacts, and for when user identities are created.
* **Custom database action scripts** can be used to integrate with an existing user identity store, or can be used where [automatic user migration](/docs/manage-users/user-migration) from a legacy identity store is required. Various [templates](/docs/authenticate/database-connections/custom-db/templates) are provided.

Whatever the use case, Auth0 extensibility allows you to tailor IdAM operations to your exact requirements. However, if not used in the right way, this can open up the potential for improper or unintended use which can lead to problematic situations down the line. In an attempt to address matters ahead of time, Auth0 provides [best practice guidance](/docs/authenticate/database-connections/custom-db/custom-database-connections-scripts) to both designers and implementers, and we recommend reading it in its entirety at least once, even if you've already started your journey with Auth0.

<Card title="Availability varies by Auth0 plan">
  Your Auth0 plan or custom agreement affects whether this feature is available. To learn more, read [Pricing](https://auth0.com/pricing).
</Card>

## Learn more

* [Authenticate with Your Own User Store](/docs/authenticate/database-connections/custom-db/overview-custom-db-connections)
* [Create Custom Database Connections](/docs/authenticate/database-connections/custom-db/create-db-connection)
* [Custom Database Action Script Templates](/docs/authenticate/database-connections/custom-db/templates)
* [Troubleshoot Custom Databases](/docs/authenticate/database-connections/custom-db/error-handling)
