in general it's probably a better idea to use your own DB and services for user data and only use user_id to link it.
echoing-zebra-73489
01/05/2022, 5:53 PM
otherwise you're relying on livekit to be your db
c
clean-journalist-37526
01/05/2022, 5:55 PM
the identity is supposed to be the user_id. In fact, if a participant joins a room with an identity that is already being used by another participant in that room, it will disconnect the existing participant, as it's considered the same user
btw, you can set participant's metadata when creating the token, and also update users metadata with the server api
d
dry-elephant-14928
01/05/2022, 6:04 PM
you could use participant's metadata field to attach application specific metadata. As Jonathan said, it's not supposed to be a persistent store, but could be used to deliver participant-specific state to other clients.
c
careful-magician-40224
01/05/2022, 8:22 PM
@echoing-zebra-73489, I have my db, what am trying to achieved is that, in a channel different user will have different roles, which will determine what they can do . The main aim is something i can use to identify the remoteParticipants from my db. The metaData as mentioned by @dry-elephant-14928 will be enough.