Converse.js - Prosody bosh not offering supported authentication mechanism

1.2k views Asked by At

Converse.js successfully makes requests to Prosody bosh but the chat client never actually connects. In the console I can see it hitting the bosh endpoint and after each request it outputs to the console:

"Server did not yet offer a supported authentication mechanism. Sending a blank poll request."

I can hit the bosh endpoint from my browser as well, the proxy pass appears to be working as intended and bosh is running and responding to requests.

Any insight is much appreciated.

2

There are 2 answers

1
JC Brand On

The error message is quite clear. Prosody is not offering a SASL authentication mechanism supported by Converse.

By default Converse supports SCRAM-SHA1, DIGEST-MD5 and PLAIN.

Your XMPP server needs to support one of these.

4
gstlouis On

I came across this issue as well while using the fullpage demo. The problem was because Prosody was forcing encrypted authentication only for client side.

I recommend going into the config file /etc/prosody/prosody.cfg.lua

Look for the code

-- Force clients to use encrypted connections? This option will
-- prevent clients from authenticating unless they are using encryption.

c2s_require_encryption = true

By default for me this was set to true, change this to false

c2s_require_encryption = false

save it and reboot Prosody

systemctl restart prosody

you could also do

prosodyctl restart