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

# Store Rule Configurations

> Learn about the global configuration object in rules for storing commonly used values.

> [!WARNING]
>
> **Rules will reach end of life (EOL) on January 31, 2028.**
>
> * As of October 16, 2023, Rules are no longer available in newly created tenants.
> * As of November 18, 2024, Rules are read-only. Active Rules still run, and you can enable or disable them and change their configuration values and secrets. You can't edit their code in the Dashboard, the Management API, or tools that use it, such as the Auth0 CLI, Deploy CLI, Terraform, and Agent Skills.
> * **After January 31, 2028, Rules stop running and are removed.**

**Use Actions to extend Auth0:**

* To learn more about Actions, read [Understand How Auth0 Actions Work](/docs/docs/customize/actions/actions-overview).
* To migrate, read [Migrate from Rules to Actions](/docs/docs/customize/actions/migrate/migrate-from-rules-to-actions).

The global `configuration` object is available in Rules for storing commonly used values, such as URLs. Sensitive information, such as credentials or API keys, should be stored through the `configuration` object and kept out of your Rules code.

## Configure values

You can set configuration values in your [Rules Settings](https://manage.auth0.com/#/rules/) on the Dashboard.

To edit or change a configuration key's value, remove the existing configuration setting and replace it with the updated value. You need to have created at least one Rule to see the configuration area, otherwise, the Rules demo shows instead.

![Dashboard - Auth Pipeline - Rules ](https://mintlify.s3.us-west-1.amazonaws.com/docs-dev/images/cdy7uua7fh8z/4OiSXzc5fYgPagHdOGbfvj/a589bdf811df66658fe21c509aed610c/Dashboard_-_Auth_Pipeline_-_Rules.png)

## Use the configuration object

Any configuration values you set can be accessed through the `configuration` object by key in your Rules code.

```javascript lines theme={null}
var MY_API_KEY = configuration.MY_API_KEY;
```

The following example is a Rule for sending a Slack message when a new user has signed up. The [Slack Webhook](https://api.slack.com/incoming-webhooks) is a `configuration` value set with the key `SLACK_HOOK_URL`.

```javascript lines theme={null}
function (user, context, callback) {
  // short-circuit if the user signed up already or is using a Refresh Token
  if (context.stats.loginsCount > 1 || context.protocol === 'oauth2-refresh-token') {
    return callback(null, user, context);
  }

  // get your slack's hook url from: https://slack.com/services/10525858050
  const SLACK_HOOK = configuration.SLACK_HOOK_URL;

  const slack = require('slack-notify')(SLACK_HOOK);
  const message = 'New User: ' + (user.name || user.email) + ' (' + user.email + ')';
  const channel = '#some_channel';

  slack.success({
    text: message,
    channel: channel
  });

  // don’t wait for the Slack API call to finish, return right away (the request will continue on the sandbox)`
  callback(null, user, context);
}
```
