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

**URL:** <https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985>\
**Category:** Get Help\
**Tags:** react, custom-login, lock\
**Created:** [March 5, 2021, 10:19pm UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985 "2021-03-05T22:19:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vimochan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vimochan/32/12799_2.png) [@vimochan](https://community.auth0.com/u/vimochan)\
**Post date:** [March 5, 2021, 10:19pm UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/1 "2021-03-05T22:19:15Z")

</div>

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?

Thanks

---

<div class="post-metadata">

**Author:** ![jessiesilva1989](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jessiesilva1989/32/12681_2.png) [@jessiesilva1989](https://community.auth0.com/u/jessiesilva1989)\
**Post date:** [March 8, 2021, 11:36am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/2 "2021-03-08T11:36:23Z")

</div>

> [@vimochan](#):
>
> 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 [omegle](https://www.omegle.run/) about implementing this?
> 
> Thanks

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

---

<div class="post-metadata">

**Author:** ![vimochan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vimochan/32/12799_2.png) [@vimochan](https://community.auth0.com/u/vimochan)\
**Post date:** [March 9, 2021, 3:48am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/3 "2021-03-09T03:48:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![supun](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/supun/32/17069_2.png) [@supun](https://community.auth0.com/u/supun)\
**Post date:** [March 9, 2021, 7:51am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/4 "2021-03-09T07:51:30Z")

</div>

Hi,

Currently, the [New Universal Login Experience](https://auth0.com/docs/universal-login/new-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: [https://auth0.com/docs/libraries/custom-signup](https://auth0.com/docs/libraries/custom-signup) and [Lock Configuration Options](https://auth0.com/docs/libraries/lock/lock-configuration#additionalsignupfields-array-).

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](https://auth0.com/docs/scopes/sample-use-cases-scopes-and-claims#add-custom-claims-to-a-token))

I would also recommend you to research more into [Role-Based Access Control](https://auth0.com/docs/authorization/rbac). 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!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [March 9, 2021, 11:13am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/5 "2021-03-09T11:13:50Z")

</div>

Thanks for sharing that knowledge Supun!

---

<div class="post-metadata">

**Author:** ![vimochan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/vimochan/32/12799_2.png) [@vimochan](https://community.auth0.com/u/vimochan)\
**Post date:** [March 10, 2021, 3:12am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/6 "2021-03-10T03:12:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 25, 2021, 3:13am UTC](https://community.auth0.com/t/i-have-a-react-app-i-would-like-to-use-auth0-for-authentication/58985/7 "2021-03-25T03:13:42Z")

</div>

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