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

> Learn about the Post User Registration Flow and post-user-registration Action trigger, which runs after a user has been created for a Database or Passwordless connection.

# Post-user Registration Trigger

The Post-user Registration trigger runs after a user is added to a Database or <Tooltip tip="Passwordless: Form of authentication that does not rely on a password as the first factor." cta="View Glossary" href="/docs/glossary?term=Passwordless">Passwordless</Tooltip> Connection.

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/auth0/docs/images/cdy7uua7fh8z/4bqF9YEPYQshnJGCx39pws/079798c354f4a83355a756a6a02650d5/post-user-registration-flow.png" alt="Diagram of the Actions Post User Registration Flow." />
</Frame>

Actions in this flow are non-blocking (asynchronous), which means the Auth0 pipeline will continue to run without waiting for the Action to finish its execution. Thus, the Action's outcome does not affect the Auth0 transaction.

## Triggers

### Post User Registration

The `post-user-registration` triggers runs after a user has been created for a Database or Passwordless connection. This trigger can be used to notify another system that a user has registered for your application. Multiple actions can be bound to this trigger, and the actions will run in order. However, these actions will be run asynchronously and will not block the user registration process.

### References

* [Event object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/post-user-registration-event-object): Provides contextual information about the newly-created user.
* [API object](/docs/customize/actions/explore-triggers/signup-and-login-triggers/post-user-registration-trigger/api-object): Provides methods for changing the behavior of the flow.

## Common use cases

### Notify Slack when a new user registers

```javascript lines theme={null}
/**
* Handler that will be called during the execution of a PostUserRegistration flow.
* 
 * @param {Event} event - Details about the context and user that has registered.
 * @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration.
 */

exports.onExecutePostUserRegistration = async (event, api) => {
  const { IncomingWebhook } = require("@slack/webhook");
  const webhook = new IncomingWebhook(event.secrets.SLACK_WEBHOOK_URL);

  const text = `New User: ${event.user.email}`;
  const channel = '#some_channel';

  webhook.send({ text, channel });
};
```

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  For this Action to execute properly, the Action must contain a secret named `SLACK_WEBHOOK_URL` and must have a dependency on the `@slack/webhook` `npm` package.
</Callout>

### Store the Auth0 user id in a remote system

A post-user-registration Action can be used to store the Auth0 user ID in a remote system.

```javascript lines theme={null}
/**
* Handler that will be called during the execution of a PostUserRegistration flow.
* 
* @param {Event} event - Details about the context and user that has registered.
* @param {PostUserRegistrationAPI} api - Interface whose methods can be used to change the behavior of post user registration.
*/

const axios = require("axios");

exports.onExecutePostUserRegistration = async (event, api) => {
  await axios.post("https://my-api.exampleco.com/users", { params: { email: event.user.email }});
};
```

<Callout icon="file-lines" color="#0EA5E9" iconType="regular">
  To use an `npm` library like `axios`, you must add the library to the Action as a dependency. To learn more, read the "Add a dependency" section in [Write Your First Action](/docs/customize/actions/write-your-first-action).
</Callout>

### Deny access to specific JA3/JA4 fingerprints

The `event.security_context` object contains the JA3/JA4 fingerprint values for the current transaction.

```js lines theme={null}
exports.onExecutePreUserRegistration = async (event, api) => {
  const clientJa4 = event?.security_context?.ja4;
  console.log('[ACTION]', {clientJa4});
  const badFingerprints = ['t13d1517h2_8daaf6152771_b6f405a00624','t13d1516h2_8daaf6152771_d8a2da3f94cd'];
  if (clientJa4 && badFingerprints.includes(clientJa4)){
    api.access.deny('suspicious_tls_fingerprint', 'Your TLS fingerprint has been flagged as suspicious');
  }
};
```
