diff --git a/package-lock.json b/package-lock.json index 59089dbc..26c3679c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14125,7 +14125,6 @@ "@xmpp/connection": "^0.14.0", "@xmpp/jid": "^0.14.0", "@xmpp/sasl": "^0.14.0", - "@xmpp/sasl2": "^0.14.0", "@xmpp/xml": "^0.14.0", "saslmechanisms": "^0.1.1" }, diff --git a/packages/client/index.js b/packages/client/index.js index ac9988aa..ddeb26ef 100644 --- a/packages/client/index.js +++ b/packages/client/index.js @@ -61,7 +61,7 @@ function client(options = {}) { // Stream features - order matters and define priority const starttls = setupIfAvailable(_starttls, { streamFeatures }); const sasl2 = _sasl2( - { saslFactory, streamFeatures }, + { streamFeatures, saslFactory }, createOnAuthenticate(credentials ?? { username, password }, userAgent), ); @@ -74,7 +74,7 @@ function client(options = {}) { const bind2 = _bind2({ sasl2, entity }, resource); // FAST mechanisms - order matters and define priority - fast && htsha256none?.(fast.saslFactory); + fast && setupIfAvailable(htsha256none, fast.saslFactory); // Stream features - order matters and define priority const sasl = _sasl(