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.
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.
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.