Auth0 Rules

Rules can be used in a variety of situations as part of the authentication pipeline where protocol-specific artifacts are generated:

  • an ID token in OpenID Connect (OIDC)

  • an access token in OAuth 2.0

  • an assertion in SAML

A new pipeline in which rules execute is created for each authentication request.

Read... To learn...                                
Rule Use Cases About different rule uses cases.
Create Rules How to create rules using the Auth Dashboard or the Management API.
Store Rule Configurations How to use the global configuration object in rules for storing commonly used values.
Cache Expensive Resources How to use the global object to reuse resources stored there instead of creating them every time you run a rule.
Management API in Rules How to access the Auth0 Management API endpoints from within rules.
Manage Metadata with Rules How to read, update, and delete user profile metadata using rules.
Redirect Users from Rules How to use rules to redirect users before an authentication transaction is complete.
Raise Errors from Rules How to display an error message to users from within rules.
Export Log Events with Rules How to create rules to capture specific log events and send data to an external service.
User Object Properties About the user object and how it stores information logged in users returned by the identity provider.
Contect Object Properties About the context object and how it stores contextual information about the current authentication transactions.
Debug Rules How to debug rules.