0
votes

I am kind of new to ejabberd. I have an IOS app where users can chat with each other. I have implemented the XMPP protocol on the client side but I have some questions. I need a user to enter his phone number. I should send that phone number to my ejabberd server to create a new user, but I also need to create a random number (some sort of verification code) in my database. After that I should send that random number to user via text message. After the user enter the verification code the XMPP on the client side should send the verification code to ejabberd. After that I should check if that verification code exist or no in my database. My question is how can I make ejabberd create that random number and associate it with the user account. Do I need to write some sore of script

Thanks

1

1 Answers

0
votes

ejabberd offers the ability to extend its functionality using modules written in Erlang or Elixir. The documentation has quite a good overview: https://docs.ejabberd.im/developer/extending-ejabberd/modules/.

What I found more valuable than this documentation is looking into the source code of ejabberd, as most functionality is implemented as modules as well. There is also the ejabberd-contrib repository with additional third-party modules to look into.