Migrate from Node 18 to Node 22
As of January 15, 2025, Node 22 extensibility runtime is generally available (GA) across our suite of extensibility offerings. This includes Actions, Rules, Hooks, Database Scripts, and Custom Social Connections. We strongly encourage you to update to Node 22 as soon as possible to adhere to best code security practices.
General considerations
Module-level code in your Actions are now invoked once per instance of your Action, and may be re-used as necessary across many executions.
For available modules in the new runtime, you can reference Can I require: Auth0 Extensibility.
The "
use npm
" directive is no longer available in Node 22.Filesystem write access has been disabled.
Marketplace integrations
Social Connections Integrations
Use the Management API to identify a complete list of social connections impacted by a Node runtime version change. In particular, all potentially impacted social connections, either explicitly created as a custom social connection or initially added through the Marketplace, have the strategy
attribute with a value of either oauth1
or oauth2
.
You can then paginate through all the existing custom social connections in a given tenant using the GET all connections endpoint. For example, the following query options returns the names and identifiers of up to 100 custom social connections:
/api/v2/connections?strategy=oauth1&strategy=oauth2&include_totals=true&fields=name&per_page=100
Was this helpful?
The Auth0 Dashboard does not allow updating the scripts for custom social connections added through the Marketplace. If a script change is required to be compatible with Node 22, you must use the Management API.
Migration tasks
Create new custom Actions
To create a new custom Action with Node 22 through the Auth0 Dashboard:
Navigate to Auth0 Dashboard > Actions > Library.
Select Create Action > Build from scratch.
In the Runtime* field, select Node 22 (Recommended).
Write your custom Actions in Node 22, test, and deploy when ready.
Upgrade existing custom Actions
You can individually upgrade existing custom Actions built on Node 12, 16, or 18 to Node 22 and revert to the previous version using the older runtime. Upgrade Actions to Node 22 by creating and deploying a new version of the existing implementation with any required changes and set to use Node 22 as the runtime.
Choose Node 22 for other extensibility products
The runtime used for the remaining (non-Actions) extensibility offerings is defined globally at the tenant's advanced settings level. Changing this setting impacts the following functionality at the same time:
Rules
Hooks
Custom database scripts
Custom social connection scripts
To change the tenant extensibility runtime setting in the Auth0 Dashboard:
Navigate to Dashboard > Settings > Advanced.
Scroll to the Extensibility section.
For Runtime, select Node 22.
For Legacy Extensibility, select the Runtime version if applicable.
Given that this is a global setting that impacts multiple extensibility features simultaneously, we recommend that you perform this step in your development tenant first, complete testing of all applicable extensibility features, and proceed to your production tenant only when you see no issues in development.
Specifically for Custom DB scripts you can follow the steps as explained on this page to individually verify a script against a specific runtime version before proceeding to change the global runtime version.