I'm building an social medial type application in this application I have an chat feature which I am planing to use xmpp for the chat features. as for my authentication I am using keycloak for authorization and authentication.
when a new user sign up I want to create a new xmpp account for each of these users and I want to authenticate them using the same access token I have for keycloak. and when someone adds them like "follow them" I want to add them to the current users xmpp contacts
what is the good approach I can use to handle this scenario? How can I handle authenticaiton how should I create users?
in xmpp the domain should be the home server right? so i cant create the user with his email it should be <account_id>@mydomain.com something like this right? if so how do i authenticate this user?