I have been searching for a solution to send some information over to the new universal login screen from my app. I’m using a React app that uses the @auth0/auth0-react hooks to login with redirect. I have tried passing values like so:
However, I’m not seeing delegate in the new universal config.
In my search, I have found many solutions for the classic universal login…just wondering if I’m doing it wrong or if it is a limitation of the new Universal Login.
I was looking for a way to assign a user to a specific role during sign up. Opposed to using a hardcoded email pulled from my DB, I was thinking about just passing a delegate flag to the loginWithRedirect function call that would identify that the person creating an account should have administrative rights.
I’m not sure I completely understand. Wouldn’t any user be able to spoof a request from your app with the params and get admin privileges? Where are you keeping your list of admin?
Doing this via an API call or list in a rule would probably be more advisable. Are you assigning them a role in auth0? Like using the auth0 roles features?
So the first usecase is that we are doing a lazy login/create account. We allow customers to search for the product they want and ask them to create an account (or log in if they are not already) during the “checkout” process. In this case, we just wanted to pass along some information regarding the product they purchased.
The second use-case is that there are 2 different audiences, one being a customer and the other being a provider of service and pending on which role you are in, I would like to have different messaging and fields in the create account experience.
For this you can use a state param to keep track of what the user was doing when they left the app to go sign in.
For this, I would recommend passing a param as you described, then write a conditional statement in the Classic Universal Login customization page that changes the input options depending on the param you passed.