Hi,
I’m looking for the best way to do the following (I’m using the NextJS SDK, the beta version):
- Login to my application and pull ‘groups’ or ‘metadata’ of the user.
- Map to said data
Basically, I’ve got an application where my backend has a whole heap of different customers in a single database. I want to specify logins per customer and have them route to the correct data within the database - I was going to simply use app_metadata or organizations etc., but I’m not sure what the best method is.
I tried using both, but I was completely unsure on how to actually get that data be accessible when the user logged in - I tried pulling the ‘user’ objective from useUser, but there’s nothing usable there other than:
nickname, name, picture, email, email_verified, sub
How can I simply add an extra hook into my logged in user? And how can I scalably configure this within auth0?
I feel like I’ve worked out a way where I could use post-login actions to go and fetch this data from some external database but that just seems like a lot of overkill; can’t I configure this within auth0?
Thanks