Two different links for user sign up, tracking the link that has been clicked

Hi,
we are integrating Auth0 in our application and we find it awesome!

We want to have two different links for signup, e.g. “Sign up as customer” and “Sign up as retailer”.
Either link will take the user to an Auth0 provided signup form using email/password or social login (Google, Facebook, …). We want to “track” the information on the kind of user that is signing up.

If the user clicked on “Sign up as customer” we’ll want to save the type “customer” on the user metadata on Auth0, otherwise if the user clicked on “Sign up as retailer” we’ll want to save the type “retailer” on the user metadata.

We tried the additionalSignUpFields option, but this works only for email/password sign up, and not for social sign up. We are thinking to save a cookie on the client to track the type of signup that the user clicked, but we are wondering if there is a more elegant solution using Auth0.

Did someone faced a similar issue? Thank you very much for your help!

Hi @augusto,

Welcome to the Auth0 Community!

You should be able to accomplish this with some custom query params in your request and a Post Login Action (we can’t use a registration action here if you want social providers to be included).

You can send query params with your request and access them in a post-login action via event.request.query property.

In your Action you set the data in user’s app_metadata unless it already exists.

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