Do you need to collect more information about your users during signup?
In this use case, we are going to request additional information from the users to complete their profiles. It consists of a custom signup form which we will use to request their First names and Last names, you may request other information as desired, only to the users in whose profile their names have not been saved previously.
Learn, step by step, how to configure it using Arengu's integration with Auth0 actions.
In this case, a form to ask for the first name and last name of the users for whom we do not have this data, integrating it with Auth0 actions.
This form will be linked to a flow that will check the user's session token and update the user's metadata in Auth0.
First of all, add the Arengu progressive profiling action of Arengu to the Auth0 dashboard.
You will be automatically redirected to the Actions Library screen.
As the page notification indicates, the next step is to add the following keys:
Click on Create to complete the configuration.
Add the newly created Arengu progressive profile action to the flow.
Click on Apply to save the Login flow.
Auth0 will process all logins for your tenant using this action. Before activating the integration in production, make sure you have configured all components correctly and verified on a test tenant.
Go to the form editor and add the required fields. In this case, we will add two Text fields to ask the user for the data we need. To set up these fields:
As we will receive the “state” and “session_token” params when Auth0 redirects the user, we will need to create two hidden fields with the same keys. Arengu will automatically pre-fill them with the corresponding URL params values.
Add these two hidden fields by clicking on the eye icon to open their settings:
Click on the ending screen and enable the redirection section
Click on the Flows tab on the light menu, create a flow linked to the first step of the form by clicking on the + icon and publish the changes.
Go to the flow editor and start the flow by adding a Verify JSON web token action:
To set it up:
Add an If/then condition action to perform conditional logic if the JWT is valid or not. The settings for this action are these:
Include a Show error message action in the False branch to display it on the form in case the JWT validations fails (eg. wrong settings, expired JWT, altered JWT, etc).
Then add a Sign JSON web token action to the True branch to sign the provided user information.
Set up this action as follows:
Payload: we will add our custom claims inside the other property and the Auth0 state on the root of the body:
Add a Store state variable to store a custom variable that we will reuse in our form. To set up this action:
Then close the True branch of the flow with a Submit the form action that will display our ending screen that redirects the user using the previously generated variable.
Finally, publish the changes.
To check if everything is working properly:
This will open the Auth0 login page where you can test the use case:
Once you have tried it, you can also check if the data has been updated this way:
If you want to try it again, you can manually delete this data and re-launch the test.
If it has not worked properly, you can check the possible errors in Auth0 Dashboard and in the Executions tab of the flow in Arengu’s editor.