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.
Getting started
Follow these steps to set up your Auth0 source in the RudderStack dashboard:
- Go to your RudderStack dashboard and click Add Source. From the list of Event Streams sources, select Auth0.
- Assign a name to your source and click Continue*.
- Your Auth0 source is now configured. Note the source Write key required to configure the endpoint URL.
![Auth0 source write key Auth0 source write key](/docs/static/f2a0aa50e19a0549f0885c1b966fcfbf/7de01/auth0-source-write-key.png)
- Head over to your Auth0 account and navigate to the Extensions page from the sidebar.
- Look for the extension Auth0 Authentication API webhooks, as shown:
![Auth0 API webhook Auth0 API webhook](/docs/static/fbc0c6f5ef94fa2175b2b948a4d006b2/d9199/auth0-3.png)
- After selecting this option, you should be able to see the extension installation page, as shown:
![Auth0 extension installation page Auth0 extension installation page](/docs/static/e770b9146662bf93c70148ff30e4d425/d9199/auth0-4.png)
- At the bottom, select the LOG_TYPES option for which you want to forward the events to RudderStack.
![Auth0 log types Auth0 log types](/docs/static/1c80ab0a3ec2c15777e3ce90ea016dd4/d9199/auth0-5.png)
- Add the WEBHOOK_URL as shown on the source settings page in your RudderStack dashboard.
![Auth0 webhook URL Auth0 webhook URL](/docs/static/130ac9b633ad3d837e8cde624730df6d/d9199/auth0-6.png)
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
Then, continue with the rest of the steps as listed below:
- Keep the authorization section as blank.
- You can disable the SEND_AS_BATCH setting to receive the events in separate requests. However, we recommend setting it to Enabled.
- 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 Property | RudderStack Property |
---|---|
client_id | properties.client_id |
client_name | properties.client_name |
details | properties.details NOTE: These are the unmodified details sent by Auth0. |
auth0_client | properties.auth0_client |
log_id | properties.log_id |
isMobile | properties.is_mobile |
description | properties.description |
ip | context.request_ip |
details.auth.user.email | context.traits.email |
details.auth.user.name | context.traits.name |
user_name | context.traits.user_name |
user_agent | context.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.
Contact us
For more information on the topics covered on this page, email us or start a conversation in our Slack community.