Pre user registration problem

Hi auth0 community,

I have a usecase where I need to build pre user registration form and it has to accept firstname, lastname, email then we have pre build api’s for to get token and then with that email and token I need to hit another api to check user exists or not same I need to display in the UI .

Can anyone guide me how to achieve this I am trying from weeks but nothing I got…, any help in this much appreciated.

Regards,
Siva.

Hi @siva09217,

Welcome to the Auth0 Community!

If you need to configure additional signup fields, I suggest either configuring them on the sign up page itself, or prompting your users to fill it in during their first sign up/login flow.

Please refer to the documentation below:

Using Forms will prompt the user to fill out the additional fields after they have signed up but before the login process has complete. This would take place during their initial signup and login attempt to capture these details.

Or alternatively, you can configure the sign up page itself to ask the user for these additional fields.

Ultimately, you get to decide when and where the user has to provide these additional fields.

Let me know if you have any questions.

Thanks,
Rueben

Hi Reuben ,

Thanks for the quick reply I am tried all steps mentioned by you I have created forms , flows and pre user registration trigger also but nothing is working I am attaching pics for your reference.

I am attaching login and signup form I need signup form needs to accept 3 fields like firstname, lastname, email.
Can you please help how can I achieve this .



Regards,
Sivaprasad k

1 Like

Hi Reuben ,

Can you help in this scenario how to achieve I have explored many options but no result .

Like I mentioned above in signup I need to ask user for 3 fields like firstname, lastname, email.


Regards,
Sivaprasad k.

1 Like

Hi all ,

Any help in above asked query really appreciate as I am struck in this for many days .

Regards,
Sivaprasad k.

1 Like

Hi Reuben ,

Any help in below query highly appreciated as I am looking to fix this issue from many days .

Thanks ,
Sivaprasad k.

1 Like

Hi @siva09217,

Thanks for all of your responses.

Firstly, Forms currently only works for the post-login flow. It would not work for the pre-user registration or post-user registration flows. (Reference: Frequently Asked Questions on Forms for Actions in Early Access)

When you use a post-login Action, you can add a check for the user’s first login attempt to prompt them for the additional fields with Forms. Note that a user automatically logs in immediately after signing up by default, which is what makes this work.

// Example using the post-login trigger

exports.onExecutePostLogin = async (event, api) => {
  if(event.stats.logins_count === 1){
    api.prompt.render(':form_id');
  }
}

exports.onContinuePostLogin = async (event, api) => {
  // Add your logic after completing the form
}

Alternatively, you can follow our knowledge solution at Configure Additional Signup Fields on the Universal Login Page, which guides you on how to include them directly on the sign-up page instead.

Thanks,
Rueben

Hi Reuben ,

Thanks for your responce actually we don’t have custom domain currently as we are showing auth0 to some of the prospective clients and we have received one request from client like initial signup customer will provide firstname, lastname, email then we will go and check in our custom API for user with those details will exists or not in case with those details we didn’t find anyone we will ask customer to provide more details like address and pincode this time we will go and check in other custom API for user exists or not .

For above use case our clint wants to see demo so this is where we need your inputs how to achieve , if you help how can we achieve above use case it will a great help .

Regards,
Sivaprasad k.

Hi @siva09217,

Thanks for the update.

In this case, I recommend reviewing this knowledge solution, which has a video guide on how to accomplish this.

Thanks,
Rueben