Sorry newbee here, I have built a react app and I am trying to integrate with my Auth0 account. My requirements are
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?
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.
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!
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.