> ## Documentation Index
> Fetch the complete documentation index at: https://auth0.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Describes Auth0 Actions items affected by the Node.js 18

# 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.

<Warning>
  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.
</Warning>

### General considerations

* For available modules in the new runtime, you can reference [Can I require: Auth0 Extensibility](https://auth0-extensions.github.io/canirequire/).
* 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](https://auth0.com/docs/api/management/v2) 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](https://auth0.com/docs/api/management/v2#!/Connections/get_connections) endpoint. For example, the following query options returns the names and identifiers of up to 100 custom social connections:

```http wrap lines theme={null}
/api/v2/connections?strategy=oauth1&strategy=oauth2&include_totals=true&fields=name&per_page=100
```

<Note>
  The <Tooltip tip="Auth0 Dashboard: Auth0's main product to configure your services." cta="View Glossary" href="/docs/glossary?term=Auth0+Dashboard">Auth0 Dashboard</Tooltip> 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 <Tooltip tip="Management API: A product to allow customers to perform administrative tasks." cta="View Glossary" href="/docs/glossary?term=Management+API">Management API</Tooltip>.
</Note>

## Migration tasks

### Create new custom Actions

To create a new custom Action with Node 22 through the Auth0 Dashboard:

1. Navigate to [Auth0 Dashboard > Actions > Library](https://manage.auth0.com/#/dashboard/actions/library).
2. Select **Create Action > Build from scratch**.
3. In the **Runtime\*** field, select **Node 22 (Recommended)**.
4. 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](/docs/customize/actions/manage-versions#revert-actions) 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:

1. Navigate to **Dashboard > Settings > Advanced**.
2. Scroll to the **Extensibility** section.
3. For **Runtime**, select **Node 22**.
4. 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](/docs/authenticate/database-connections/custom-db/custom-database-connections-scripts/environment) to individually verify a script against a specific runtime version before proceeding to change the global runtime version.
