Skip to main content
The Pre-user Registration trigger runs before a user is added to a Database or Connection.
Diagram showing the Actions Pre User Registration Flow.
Actions in this flow are blocking (synchronous), which means they execute as part of a trigger’s process and will prevent the rest of the Auth0 pipeline from running until the Action is complete.

Triggers

Pre-user Registration

The pre-user-registration  triggers runs when a user attempts to register through a Database or Passwordless connection. This trigger can be used to add metadata to the user profile before it is created or to deny a registration with custom logic.
You cannot currently use pre-user-registration Actions to add metadata to passwordless users.

References

  • Event object: Provides contextual information about the request to register a new user.
  • API object: Provides methods for changing the behavior of the flow.

Common use cases

Deny registration by location

A pre-user registration Action can be used to prevent a user from signing up.

Set metadata in the user profile

A pre-user registration Action can be used to add metadata to the user profile before it is created.
You cannot currently use pre-user-registration Actions to add metadata to passwordless users.

Store a user ID from another system in the user profile

A pre-user registration Action can be used to store a user ID from another system in the user profile.
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.

Deny access to specific JA3/JA4 fingerprints

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