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.
This topic seems related to our new EA feature, Forms for Actions, which rolled out of the beta stage on May 7th. Our Product team prepared the whole Documentation page with examples of Use cases. Forms for Actions. If you find yourself having questions regarding this new feature for the next two weeks, we are hosting an Ask Me Anything session. Our Product Expert will provide comprehensive written answers on May 21st from 8 AM to 10 AM PST.
Find out more about Forms for Actions and learn more about AMA.