Redirect based on SignUp or Login flow

In my React Application I am using withAuthenticationRequired HOC component to display the Auth0 Login/Sign Up form. So there is no separate button to display Auth0 Universal Login Form. If use is not Logged In, by default it will display the Login Form.

What I need is a different callback flow for Signup and Login. If a user clicks the Universal Form sign up button then after authorization, he should be redirected to the page that asks for extra information like DateOfBirth, LastName etc. However, if the user click LogIn, he should not be redirected to the that page.

I am not sure how to redirect based on sign up and login button in the Auth0 Form. Also I am not sure if I should redirect the user using Auth0 actions before the completion of PostLoginFlow. I want to save the DOB, LastName in the user_metadata too. So if I use Auth0 action, is it possible to submit the DOB, LastName values to the actions so that it can save in user_metadata.

Hey @ravimaharjan, Welcome to the community!

You could use the Post Login Action to make the redirect during the login flow, this will ensure that the information is captured as you desire before granting access to your application.
The Postlogin Action can be built out to make a check on the users Login_Count Event Object, for example if this is their first login (signup) you can redirect to the page to collect user information then return them to complete the authentication.

The extensibility of actions could also allow you to check if any pre-existing users have that information missing from their profile, and if so introduce the redirect to capture the information during their current login.
Hope this helps! thanks