Recieve additional data from auth0 webhook

Ok so this is the login flow of the user:

  1. User visits /login
const config = {
    authRequired: false,
    auth0Logout: true,
    secret: env.auth_secret,
    baseURL: env.auth_base_url,
    clientID: env.auth_client_id,
    issuerBaseURL: 'url',


  1. User logs in or signs up through the login prompt created by auth0
  2. When login is successfull webhook from auth0 sends data to /user/verified
const axios = require("axios");
const URL = '';
exports.onExecutePostLogin = async (event, api) => {
  try {
    await, {data: event, secret: event.secrets.webhook_secret});
  } catch (error) {
  1. In my backend i check if the user is verified or not


Lets say the user enters /login/someData/

How could i recieve someData in my /user/verfied endpoint?

I am using nodejs as my backend.

Hi @elias.knudsen,

To understand your question better, could you please clarify how the user enters “/login/someData/” during the login process? Or what you mean by “/login/someData/”?



would be like this:

app.get('/login/:referral_code', (req, res) => {
    const referral_code = req.params.referral_code
    //Route user to universal login page from auth0


My main goal is that the webhook from the postlogin flow should contain this referral_code, so i can access it at /user/verified

Here is an illustration:)

Hello Elias,

We did something similar, we use the Auth0 Actions to save the data in your case referral_code the users meta data and then attached referral_code to the token.