Search code examples
ejabberdconverse.js

register a user in converse.js to ejabberd server using javascript


how to register an user using converse.js to ejabberd from javascript instead of using register form of converse.js. I want to register the user using converse.js api instead doing it manually from the form. Please help me with your suggestions.


Solution

  • Converse.js supports XMPP-0077 in band registrations to allow users to manually register new accounts for themselves.

    It should be possible to also do the same thing automatically/programmatically instead of expecting the user to do it.

    However, you would need to write new code to do this.

    Instead of letting the user specify their username and password, you would generate and then send those values to the XMPP server automatically with Javascript.

    However, a better and more secure way would most likely be to do this server-side. Either by using a RESTful API provided by the XMPP server (some do, but not all), or by creating a server-side XMPP client which does the registration.