Custom Database Action Script Templates
Your Auth0 subscription plan affects the availability of some features. For more information, see Auth0 pricing plans.
If you have your own database (known as a legacy data store in Auth0) containing user identity data, you can use it as an identity provider to authenticate users. You create and configure the connection to your legacy data store as a custom database in Auth0. You can choose to migrate data to Auth0's data store from your legacy database incrementally over time, or you can continue to use it without migrating data. We provide script templates to perform functions on the custom database that you can use and customize.
There are two different types of custom database scripts:
Trickle Migration: Whenever a user logs into Auth0, if the user is not yet in Auth0, the script will check the legacy database to see if the user exists there. If found and the Import users to Auth0 flag is turned on, user data migrates the user to Auth0 data store.
Legacy Database: Auth0 will always query the underlying database when a user tries to log in, is created, changes their password, verifies their email, or is deleted. If found and the Import users to Auth0 flag is not turned on, user data stays in the legacy database and does not migrate to Auth0.
Auth0 provides the following custom database action scripts:
Completion and the
callback function supplied to each action script effectively acts as a signal to indicate completion of operation. An action script should complete immediately following a call to the
If an action script uses asynchronous processing, then a call to the