Passing custom parameters to Auth0 Post User Registration Flow using New Universal Login

When a user is redirected to my universal login / sign up page with google tag manager query params, I would like to be able to pass custom parameter to the universal login / sign up page and read these query params in an Auth Post User Registration Flow.

These redirects can occur from our web application where we use the @auth0/auth0-react package. They can also occur on other sites with our marketing material.

It seems like when we send a user to the universal login page, these query params are lost when they begin signing up.

For example, in my react application I can redirect an unauthenticated user to our login page like so:

import { withAuthenticationRequired } from "@auth0/auth0-react";


export default withAuthenticationRequired(
  function SomeRoute() {
    return (
     <></>
    );
  },
  {
    loginOptions: {
      appState: {
        foo: "bar",
      },
      authorizationParams: {
        "auth-param": "foo-bar",
      },
      fragment: "some-fragment",
      customParam: "foo-bar-baz",
    },
  }
);

From this login page, the user can then click “Sign up” and create an account. I have tried many different ways to read query params or additional information from a user signing up for the first time with Auth0 actions, and I am not successful.

The use case is to track which campaign resulted in a successful sign up for a user by using Auth0 actions. We can detect a new user signing up and we’d like to know which marketing campaign resulted in that sign up.

Hi @alex21,

Welcome to the Auth0 Community!

Unfortunately, it is not possible to send custom query parameters to the Post User Registration Action.

One possible workaround might be to configure additional sign-up steps using Forms to ask the user for the marketing campaign name.

Let me know if you have any questions.

Thanks,
Rueben

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.