I have a react app, I would like to use Auth0 for Authentication

Sorry newbee here, I have built a react app and I am trying to integrate with my Auth0 account. My requirements are

  1. I need some additional fields during signup. one of them is a Role as a dropdown. I need this role to be assigned to the user once sign up is complete.
    2.Manipulate the UI based on the role and authenticated.

Can the community help me with guidance on how to go about implementing this?


we’ ll learn how to authenticate our React apps using some form of authentication to their apps or want to get familiar with Auth0 .

Both, I would like to capture the role during signup or the users. When the same users login, based on the role description I would like to manipulate the UI.


Currently, the New Universal Login Experience does not support Additional Sign Up Fields. However, still you can use the Classic Experience with Lock SDK to show additional Sign Up fields.

To learn more about Custom Sign Up, please refer to: Custom Signup and Lock Configuration Options.

After capturing the required data, you can save them in the user_metadata in user profile. Then, you can add them to the user’s Access Token via a Rule (Read more: Sample Use Cases: Scopes and Claims)

I would also recommend you to research more into Role-Based Access Control. Generally, we do not allow the user to select their own role and Identity Administrator should set them up for the user.

Hope the above information helps. Let us know if you have further questions!

1 Like

Thanks for sharing that knowledge Supun!

Thanks much for the detailed response Supun, I have tried Lock, I was able to add additional signup fields and was able to assign the role based on user selection. The problem I ran into is to get the user object back and to figure out the isAuthenticated value after login. I gave up and went back to implementing Universal login hoping there is a way to customize the signup fields. So as you say my only options are either thrugh APIs or through Lock. Let me retry Lock. Thanks again.

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