Tracking relations between users

I’m using Auth0 as the SSO solution for a chat system I’m developing. Part of the system includes users being able to friend each other to interact in private chats.

The problems I’m having:

  • How do I track the relationship between users? Should I use a custom API with a database to keep track of the relations between user IDs, or is there a simple way of doing it with Auth0?
  • How do I get profile information for another user that is not the authenticated user? I’d need to get a profile picture and some metadata like a display name to present to the authenticated user for their friends list

I’ve been reading through the docs a ton but I’m having trouble finding a good solution for this problem.

Hi @keith.mitchell,
I will try to answer these both below:

  1. For the first question, I am not entirely sure what you would like to actually track, or what you mean by “relationship”. Let’s say, if a two users are “friends” you can keep track of that by (maybe) storing an array of ids of the friends that user has. That’s just an idea, but yes we do not offer the concept of “friends” between users.
  2. To get the information of another user, you’d need at least the id of that user. In this case you may have it if you follow the approach suggested on the first point because they’d be stored in that array of users. Then, you can use that user id to call the management api and retrieve any data from it.

Hope that helps.