Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions main/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@
"group": "Database Connections",
"pages": [
"docs/authenticate/database-connections",
"docs/authenticate/database-connections/auth0-user-store",
{
"group": "Your User Store",
"pages": [
Expand Down Expand Up @@ -988,7 +987,7 @@
"docs/manage-users/user-migration",
"docs/manage-users/user-migration/configure-automatic-migration-from-your-database",
"docs/manage-users/user-migration/bulk-user-imports",
"docs/manage-users/user-migration/bulk-user-import-database-schema-and-examples",
"docs/manage-users/user-migration/bulk-user-import-schema",
"docs/manage-users/user-migration/bulk-user-exports",
"docs/manage-users/user-migration/user-import-export-extension",
"docs/manage-users/user-migration/user-migration-scenarios",
Expand Down Expand Up @@ -24591,6 +24590,10 @@
"source": "/docs/fr-ca/customize/extensions/real-time-webtask-logs",
"destination": "/docs/fr-ca/customize/actions/actions-real-time-logs"
},
{
"source": "/docs/authenticate/database-connections/auth0-user-store",
"destination": "/docs/authenticate/database-connections"
},
{
"source": "/docs/quickstart/webapp/aspnet-core-blazor-server/interactive",
"destination": "/docs/quickstart/webapp/aspnet-core-blazor-server"
Expand Down
51 changes: 15 additions & 36 deletions main/docs/authenticate/database-connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,60 +2,39 @@
description: Learn how to create and use a database connection using either the Auth0 user store or your own user store.
sidebarTitle: Overview
title: Database Connections
validatedOn: 2026-02-11
---
Auth0 provides database connections to authenticate users with an identifier (email, username, or phone number) and password. These credentials are securely stored in the Auth0 user store or in your own database.
Auth0 provides database connections to authenticate users with an identifier (email, username, or phone number) and password or [passkeys](/docs/authenticate/database-connections/passkeys/configure-passkey-policy). These credentials are securely stored in the Auth0 user store or in your own database.

You can create a new database connection and manage existing ones at [Auth0 Dashboard > Authentication > Database](https://manage.auth0.com/#/connections/database):
You can create a new database connection and manage existing ones at [Auth0 Dashboard > Authentication > Database](https://manage.auth0.com/#/connections/database).

## Scenarios
## Database options

<Tabs><Tab title="Auth0 user store">
### Use Auth0 user store

Auth0 provides the database infrastructure to store your users by default. This scenario provides the best performance for the authentication process since all data is stored in Auth0.

The Auth0-hosted database is highly secure. Passwords are never stored or logged in plain text but are hashed with **bcrypt**. Varying levels of password security requirements can also be enforced. To learn more, read [Password Strength in Auth0 Connections](/docs/authenticate/database-connections/password-strength).
The Auth0-hosted database is highly secure. Passwords are never stored or logged in plain text but are hashed with **bcrypt**. Varying levels of password security requirements can also be enforced. To learn more, read [Password Strength in Auth0 Database Connections](/docs/authenticate/database-connections/password-strength).

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">

For database connections, Auth0 limits the number of repeat login attempts per user and IP address. To learn more, read [User/Password Authentication Rate Limits](/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy/database-connections-rate-limits).

For database connections, Auth0 limits the number of repeat login attempts per user and IP address. To learn more, read [Database login limits](/docs/troubleshoot/customer-support/operational-policies/rate-limit-policy#database-login-limits).
</Callout>

</Tab><Tab title="Your own user store">
To use Auth0's database infrastructure as your user store, you have options to migrate your users to Auth0. The [automatic migration](/docs/manage-users/user-migration/configure-automatic-migration-from-your-database) feature adds your users to the Auth0 database one-at-a-time as each logs in and avoids asking your users to reset their passwords all at the same time. Or, use Management API to create a job to [import users](/docs/manage-users/user-migration/bulk-user-imports). To learn more, read [User Migration Scenarios](/docs/manage-users/user-migration/user-migration-scenarios) for migration examples.

If you have an existing user store, or wish to store user credentials on your own server, Auth0 enables you to connect to a [custom database](/docs/authenticate/database-connections/custom-db) or repository and use it as the identity provider.
### Use your own database

<Frame>![](/docs/images/cdy7uua7fh8z/3SNKwx0KzkUwbodqUQbtvW/df720f8871b56dd7ec399a24aa621c36/2025-02-20_16-50-04.png)</Frame>
If you have an existing user store, or wish to store user credentials on your own server, Auth0 enables you to connect to a [custom database](/docs/authenticate/database-connections/custom-db) or repository and use it as the identity provider.

<Frame>![](/docs/images/cdy7uua7fh8z/3SNKwx0KzkUwbodqUQbtvW/df720f8871b56dd7ec399a24aa621c36/Authentication>Database>use-my-own-database.png)</Frame>

In this scenario, you provide the login script to authenticate the user that will execute each time a user attempts to log in. Optionally, you can [create scripts](/docs/authenticate/database-connections/custom-db/templates) for sign-up, email verification, password reset, and delete user functionality.

The scripts are Node.js code. Auth0 provides [templates](/docs/authenticate/database-connections/custom-db/templates) for most common databases, such as ASP.NET Membership Provider, MongoDB, MySQL, PostgreSQL, SQL Server, Windows Azure SQL Database, and for a web service accessed by Basic Auth. Essentially, you can connect to almost any kind of database or web service with a custom script.

<Warning>

Only tenants created prior to 17 July 2018 have access to Webtask.io and the Webtask CLI. If you are an enterprise customer with a newer tenant, please contact your account representative to request access. Other requests can be made through the [Auth0 Contact Form](https://auth0.com/get-started?place=documentation%20post&type=link&text=auth0%20contact%20form) and will be evaluated on a case-by-case basis.

</Warning>

</Tab><Tab title="Migrating to Auth0">

In this scenario, you have a legacy user store and wish to switch to the Auth0 store. Auth0 provides an automatic migration feature that adds your users to the Auth0 database one-at-a-time as each logs in and avoids asking your users to reset their passwords all at the same time. To learn more, read [Configure Automatic Migration from Your Database](/docs/manage-users/user-migration/configure-automatic-migration-from-your-database).

</Tab><Tab title="Requiring a username">

1. Go to [**Auth0 Dashboard > Authentication > Database**](https://manage.auth0.com/#/connections/database), and select the name of the connection you want to edit.
2. Locate **Requires Username**, and use the toggle to enable or disable requiring a username.

<Frame>![Enable or disable require username setting](/docs/images/cdy7uua7fh8z/1MlOrFmcSCOCRYKRxWz6xT/7a87dac16a31cbb6e608489c5843d6c7/2025-02-25_12-02-23.png)</Frame>

To see how this will affect the login screen, select the **Try Connection** view. Notice that once **Requires Username** is enabled, new users must enter a username and their email address to sign up.

<Frame>![Login form with username](/docs/images/cdy7uua7fh8z/AiB37UZqyBPb8h55PZtzm/73e6fd0033f63f865c40f189db1620ef/2025-01-29_15-22-11.png)</Frame>

Users can then login with either their username or their email address. Users who registered while **Requires Username** was disabled will not have a Username field stored and will have to log in with their email address.

</Tab></Tabs>

## Learn more

* [Custom Database Connections](docs/authenticate/database-connections/custom-db)
* [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)
* [Manage Users](/docs/manage-users)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ Your Auth0 plan or custom agreement affects whether this feature is available. T

</Card>

<Warning>

Only tenants created prior to 17 July 2018 have access to Webtask.io and the Webtask CLI. If you are an enterprise customer with a newer tenant, please contact your account representative to request access. Other requests can be made through the [Auth0 Contact Form](https://auth0.com/get-started?place=documentation%20post&type=link&text=auth0%20contact%20form) and will be evaluated on a case-by-case basis.

</Warning>

Use a custom database connection when you want to provide access to your own independent (legacy) identity data store for the following purposes:

* **Authentication**: Use your database as 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> in Auth0 to authenticate users. (Referred to as legacy authentication.)
Expand Down
30 changes: 1 addition & 29 deletions main/docs/customize/rules/debug-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,4 @@ The **Try this rule script** feature functions outside a specific client context

## Actions Real-time Logs

The Actions Real-time Logs displays all logs in real-time for all custom code in your account, which includes all `console.log` output and exceptions. To learn more, read [Actions Real-time Logs](/docs/customize/actions/actions-real-time-logs).

## Debug Rule CLI

<Warning>

Only tenants created prior to 17 July 2018 have access to Webtask.io and the Webtask CLI. If you are an enterprise customer with a newer tenant, please contact your account representative to request access. Other requests can be made through the [Auth0 Contact Form](https://auth0.com/get-started?place=documentation%20post&type=link&text=auth0%20contact%20form) and will be evaluated on a case-by-case basis.

</Warning>

In the [Rules Editor](https://manage.auth0.com/#/rules/create), the **Save and Debug** option displays instructions for installing, configuring, and running the [webtask CLI](https://github.com/auth0/wt-cli) for debugging Rules. Paste these commands into a terminal to see the `console.log` output and any unhandled exceptions that occur during Rule execution.

For example:

```bash lines
~ npm install -g wt-cli
~ wt init --container "youraccount" --url "https://sandbox.it.auth0.com" --token "eyJhbGci...WMPGI" -p "youraccount-default-logs"
~ wt logs -p "youraccount-default-logs"
[18:45:38.179Z] INFO wt: connected to streaming logs (container=youraccount)
[18:47:37.954Z] INFO wt: webtask container assigned
[18:47:38.167Z] INFO wt: ---- checking email_verified for [email protected]! ----
```






This debugging method works for Rules tried from the Dashboard and for those actually running during user authentication.
The Actions Real-time Logs displays all logs in real-time for all custom code in your account, which includes all `console.log` output and exceptions. To learn more, read [Actions Real-time Logs](/docs/customize/actions/actions-real-time-logs).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading