Skip to main content
The pre-user-registration trigger runs when a user attempts to register through a Database or connection, before the user is created. Use this trigger to add metadata to the user profile before it is created or to deny a registration with custom logic.
Diagram showing the Actions Pre User Registration Flow.
Actions in this flow are blocking (synchronous): they execute as part of the trigger’s process and prevent the rest of the Auth0 pipeline from running until the Action completes.
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:

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: