Register XMPP-Account using the Strophe.js-Register-Plugin


I try to register a xmpp-account using the strophe-register-pluging ( It works fine with the connection manager from example “” but I cant register the account using the OpenFire connection manager. (Normal login works with both connection managers…)

Connection State Changes are 1 -> 10. 1 means “connecting” but i dont know what 10 means…

$(document).bind('connect', function (ev, data) {
          console.log("Connect to XMPP-Server...");           var connection = new Strophe.Connection(
//                              "");
                              "http://localhost/http-bind");           var callback = function (status) {
              if (status === Strophe.Status.REGISTER) {alert("1"+status);
            connection.register.fields.username = "fghdfhg";alert("2"+status);
   = "dfgfdgfdg";
            connection.register.fields.password = "dfddfgfdg";
              } else if (status === Strophe.Status.REGISTERED) {
              } else if (status === Strophe.Status.CONNECTED) {
        } else if (status === Strophe.Status.DISCONNECTED) {
            console.log("Disconnected from XMPP-Server");
    }; //    connection.connect(data.jid, data.password, callback);
    connection.register.connect("", callback, 60, 1);     WebChat.connection = connection; });

does someone can say me what i’m doing wrong? Is there a server configuration i have to change?

hmm, there is probably a bug in the register-plugin when working with OpenFire:

use "[http://localhost/http-bind/](http://localhost/http-bind/)" and nothttp://localhost/http-bind”) for openfire. You need the trailing slash.``

Check this post:

javascript - XEP-0077 In-band registration with Strophe.js and openfire usage - Stack Overflow