How to distinguish what page initiated user up in Next.js SDK

I have a working implementation of the the auth0 nextjs SDK in my next app. However, my application will have 2 different types of users: buyers and sellers.

I would like to have 2 different landing pages 1 for buyer and 1 for seller. As of now, I have an Auth0 Action that upon user signup also creates a MongoDB user on my end. I would like some kind of way to determine if the user should be a buyer or seller.

I was thinking of possibly passing the URL of the page when signup is triggered but I’m unsure of how I would go about doing this. I’ve seen this question asked a few times by others and never fully answered.

Is there a way to go about this through the SDK? Is there some kind of way to pass a query string? One approach I saw suggested was having 2 different Auth0 applications to represent 2 different login buttons. Again, I’m unclear if this is an approach to take w/ the SDK.

I would love any suggestions even if it’s just the SDK does not have an elegant way to handle this. Any suggestions? Please let me know if I’m not clear.

Hi @chancep

Welcome to Auth0 Community !!!

Before we recommend any solution I have a couple of questions:

  • Can a user be a buyer as well as a seller?
  • Are you using the Auth0 Universal login page or are you building custom UX?
  • How these users will sign up?

Thank you
Jeff

Good morning @jeff0 thanks for your reply.

-The user would not be both a buyer and seller. Ideally, they’d have a different UI/app experience. Once it is determined they are a seller they’d see a different dashboard and vice versa.
-Auth0 Universal login
-Right now the signup flow just has one user that signs up through Universal login and is spun back to the main landing page. We’d like to have the ability to have a seller initiate same signup flow but distinguish they are a seller instead of a buyer (perhaps came from seller landing page and not main/buyer landing page?). I’m unsure of how we’d go about doing that.

Please let me know if I need to be a little clearer. I’m not as familiar w Auth as I’d like to be.

Hi @jeff0 , any update on this? I hate to ping you again but we are actively deciding if we can use Auth0 or something else would be a better solution.

I’ve seen it suggested that the easiest thing might be to use 2 different “applications” (one for buyer/seller). I’m unsure how that would work w/ the SDK playing nicely together. Is this still a workable solution (is there a better one)? If so, would you happen to have any examples of that flow?

Thanks!