Auth0 is a popular solution used by many companies to add authentication and authorization services to their applications. You can now send login and signup-related events to RudderStack whenever Auth0 generates an authentication log by adding an Auth0 Authentication API webhook extension that points to RudderStack.

Starting May 4, 2022, the recommended Authentication API webhook is no longer supported by Auth0. As a result, this integration is deprecated. For more information, refer to the Auth0 docs.

Getting started

Follow these steps to set up your Auth0 source in the RudderStack dashboard:

  1. Go to your RudderStack dashboard and click on Add Source. Then, select Auth0 from the list of Event Stream sources, as shown:
Auth0 source in RudderStack
  1. Assign a name to your source and click on Next.
  2. Your Auth0 source is now configured. Note the source Write key - this will be required to configure the endpoint URL in the following steps.
Auth0 source write key
  1. Head over to your Auth0 account and navigate to the Extensions page from the sidebar.
  2. Look for the extension Auth0 Authentication API webhooks, as shown:
Auth0 API webhook
  1. After selecting this option, you should be able to see the extension installation page, as shown:
Auth0 extension installation page
  1. At the bottom, select the LOG_TYPES option for which you want to forward the events to RudderStack.
Auth0 log types
  1. Add the WEBHOOK_URL as shown on the source settings page in your RudderStack dashboard.
Auth0 webhook URL

The webhook URL is of the following format:

<DATA_PLANE_URL>/v1/webhook?writeKey=<WRITE_KEY>

A sample webhook URL is shown below:

https://hosted.rudderlabs.com/v1/webhook?writeKey=1bCenS7ynqHh8ETX8s5Crjh22J
For more information on the data plane URL, refer to thissection.
Make sure you add the source write key as query parameter to the URL. This is required to prevent the webhook from failing because of an invalid write key.

Then, continue with the rest of the steps as listed below:

  1. Keep the authorization section as blank.
  2. You can disable the SEND_AS_BATCH setting to receive the events in separate requests. However, we recommend setting it to Enabled.
  3. Finally click on INSTALL to install the webhook on your Auth0 dashboard.

Event transformation

The Auth0 webhook events are ingested into RudderStack after converting them in a RudderStack event format. The user_id set by Auth0 is converted to userId.

The following table lists the properties populated from the Auth0 event payload directly to the RudderStack event:

Auth0 PropertyRudderStack Property
client_idproperties.client_id
client_nameproperties.client_name
detailsproperties.details NOTE: These are the unmodified details sent by Auth0.
auth0_clientproperties.auth0_client
log_idproperties.log_id
isMobileproperties.is_mobile
descriptionproperties.description
ipcontext.request_ip
details.auth.user.emailcontext.traits.email
details.auth.user.namecontext.traits.name
user_namecontext.traits.user_name
user_agentcontext.userAgent

Debugging

If you're unable to see any events flowing from the Auth0 API webhooks to RudderStack, you can troubleshoot the issue by viewing the API webhooks logs. To do so, go to your Auth0 dashboard and navigate to Monitoring - Logs.

Refer to the Auth0 documentation for more information on troubleshooting your webhook.

Contact us

For queries on any of the sections covered in this guide, you can contact us or start a conversation in our Slack community.

Contents