How to implement registration for multiple user types?

I need two separate registration buttons: “Sign up as Employer” and “Sign up as Recruiter”. Both will go to the same standard Auth0 registration form. When I view registered users in the Auth0 Dashboard I would like to see which one they signed up as.

I am using your example code for C# ASP.NET Core and there is this method in AccountController.cs:

public IActionResult Login(string returnUrl = "/")
{
    return new ChallengeResult("Auth0", new AuthenticationProperties() { RedirectUri = returnUrl });
}

This code seems to be called from the form when I press a “Register” button.

What changes can I make in this c# code to pass to Auth0 whether the user clicked the “Employer” or “Recruiter” button please?

Sorry to bump this but I’m new to Auth0 and would appreciate any help.

If I can’t get an answer on something relatively simple then what happens when I have a complex question regarding Auth0? I can see it’s safer if I go back to hand-rolling my own authentication code.

Sorry to bump this but I’m new to Auth0 and would appreciate any help.

If I can’t get an answer on something relatively simple then what happens when I have a complex question regarding Auth0? I can see it’s safer if I go back to hand-rolling my own authentication code.

Given you mention the standard Auth0 registration form I’m assuming your users will authenticate through a database connection (username/password credentials) and that you’re using Lock (if that’s not the case update your question with enough detail). If an end-user can freely choose to sign up as an employer or recruiter you can take advantage of Lock 10 support for additional sign up fields and provide an extra field where the user chooses if it’s a recruiter or employer.

By default, this means you would have a single sign up button and then on the form the user chooses the type. However, with more effort you could also implement the two button approach where clicking each button would show Lock pre-configured with the user choice.

The data collected through this approach is available at the user_metadata level which user can edit at any time so if you wan to lock the user to the initial choice, you should move this information from the user_metadata to the app_metadata collection which the end-user cannot edit.

Thank you. I shall give Auth0 another try.

Thank you. I shall give Auth0 another try.