I was able to register users into my Ejabberd server, and I think I changed something. Now I can't register users at all and i am not getting any error.
I alert the status when i start the registration process, and it just calls 1 then 11 then 10. I am not sure what they mean, and if there is anywhere I can see the definition for them so I can know the error that it is calling.
My registration code should be correct because I can register users into my Openfire server. But it suddenly stopped working while registering in Ejabberd on my localhost and on EC2. So I think I have changed some settings that I shouldn't have.
My register access rules in the configuration:
[{all,allow}]
Here is my code:
function Onregister(){
var jid = document.getElementById("jid").value;
var password=document.getElementById("pass").value;
var connection = new Strophe.Connection(
"http://clarkhos-macbook-pro.local:5280/http-bind/");
var callback = function (status) {alert(status);
if (status === Strophe.Status.REGISTER) {
connection.register.fields.username = jid;
connection.register.fields.name = jid;
connection.register.fields.password = password;
connection.register.submit();
} else if (status === Strophe.Status.REGISTERED) {
console.log("registered!");
connection.authenticate();
} else if (status === Strophe.Status.CONNECTED) {
$(document).trigger('connected');
}
};
connection.register.connect("clarkhos-macbook-pro.local", callback, 60, 1);
}
Thanks for your time
Edit:
Also I tried uninstalling the whole ejabberd server in my local machine and re-installed it. Still can't register new users, it has status 1 then 11 then 10 as before.