How to collect additional information as part of the User Registration flow?

I am using Auth0 for an application and building out the frontend using Next.js, so I have been using the @auth0/nextjs-auth0 sdk. I am trying to create a user registration flow where the user first signs up using either email/password or google/facebook/etc and then fills out a couple other forms providing additional information (phone number, birthday, etc). I don’t want the user to be able to access other pages on the site or various API resources until they have completed the registration flow. How would I do this? Also, should this information be stored in user_metadata or a separate service that I create?

Ideally, this process would look similar to how a user registers for Auth0 itself by first signing up with username/password or social login and then is forced to specify whether they are a using Auth0 for a company or other purposes and provide some additional information.

Thanks for any help.

Hi @jfarley,

Welcome to the Auth0 Community!

Have you taken a look at our How to configure additional signup fields on the Universal Login Page FAQ?

It has instructions on how to get additional sign-up fields configured which saves them to the users’ user_metadata.

Please let me know if you have any questions or need further clarification.

Thanks,
Rueben

1 Like

It seems like this wouldn’t work when the user does social login though right? And also does this allow dates?

Hi @jfarley,

Thank you for your response.

That is correct. An alternative solution that would work for both Username/Password and Social logins would be to use a Post-Login action script that checks for the user’s first login attempt and redirect them to a custom page where you can collect more information and save them as the user_metadata. After that’s complete, you can resume the authentication back to your application.

For more information, please check out: Redirect with Actions

Could you please clarify in more detail what you mean by this?

Thanks,
Rueben

By dates I meant like a datepicker object in the user signup flow. I think I’m just gonna handle all of this additional information outside of the auth0 signup. Actions seem like a pretty good way to manage this.

1 Like

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

Hi @jfarley,

Thank you for your response and clarification.

Unfortunately, AFAIK, there is not a datepicker object in the user signup flow.

That sounds good! Please let me know if you have any questions or need help with the implementation.

Thanks,
Rueben