Reputation: 727
I have a SaaS application with users stored in an MSSQL database, where usernames are email addresses.
I have set up a second Windows server which is running ejabberd.
I'm a little confused on how domains should work, especially around usernames. I'd like eventually that when a user registers on the SaaS application, an account is generated on the XMPP server.
I'm tempted to use their user ID (which is a guid) for this, and append our domain to the end. Or - can I use their email addresses (which will have domains that are not mine) without causing issues?
Upvotes: 1
Views: 37
Reputation: 41648
Better use the guid plus your domain. XMPP servers use the domain name to figure out where to route messages, in particular whether the message is processed internally in the server (which would be the case if the domain of the user ID is equal to the domain of the server), or should be forwarded to some other server. You'll find ejabberd to be much less confused if you stick to one domain name for the JIDs.*
* XMPP user IDs are known as JIDs, from the earlier name of the protocol, "Jabber".
Upvotes: 1