Auth0 Rules

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 in Rules How to use the global object to reuse resources stored there instead of creating them every time you run a rule.
Use the Management API with Rules How to access the Auth0 Management API endpoints from within rules.
Redirect Users from Within 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.
User Object Properties in Rules About the user object and how it stores information logged in users returned by the identity provider.
Context Object Properties in Rules About the context object and how it stores contextual information about the current authentication transactions.
Debug Rules How to debug rules.