Use prosody against wordpress

I checked the prosody modules page and I found a module mod_auth_wordpress, which seems to do what I wanted: authenticate users I already have in an wordpress site.
I made this:

  • in meet.domain.cfg.lua:
    authentication = “wordpress”
    wordpress_table_prefix = “wp_”
    sql = {
    driver = “MySQL”;
    database = “my_wordpress”;
    host = “localhost”;
    username = “username”;
    password = “secretpassword”;
    The problem is that after I enter user/pass, I get this error:
    “Error Oops! Something went wrong and we couldn’t connect to the conference: connection.otherError”
    In prosody.log:
    Feb 26 09:56:16 mod_bosh info New BOSH session, assigned it sid ‘49914d7a-4f2c-411b-8edc-761edcea0a41’
    Feb 26 09:56:17 bosh49914d7a-4f2c-411b-8edc-761edcea0a41 info Authenticated as f43fcd4d-ce6f-4ff6-a2d2-799acf93e925@guest.domain
    Feb 26 09:56:23 mod_bosh info New BOSH session, assigned it sid ‘1ff3a4e1-fadd-432f-b6bd-dfd4181bb82a’
    I have searched for similar issues, but found little indications.
    Can anyone help?

So you followed the “Secure domain” section from jicofo README and only changed there the authentication method, from internal to wordpress?

No, I also downloaded the module from prosody site and moved it to a local folder so prosody can use it. It is enabled, because I saw in logs some errors (lua modules not installed) , I fixed the errors and now prosody seems started ok. Is there any way to test auth?

Ok, I assume you had followed the “Secure domain” config. Are the usernames in form pf email when using wordpress?
My best guess is for now is to open the Network Tab in the developer tools and check the xmpp packet for the error, what does it look like. Or maybe enable debug logging in prosody. Check also jicofo logs.

Yes, usernames in form of email.
Logger.js:125 [JitsiMeetJS.js] <Object.getGlobalOnErrorHandler>: UnhandledError: null Script: null Line: null Column: null StackTrace: Error: Strophe: BOSH-Connection failed: host-unknown
at Object.i.Strophe.log (strophe.util.js:89)
at Object.error (strophe.js:2083)
at e.Bosh._connect_cb (strophe.js:5291)
at r.Connection._connect_cb (strophe.js:3910)
at e.Bosh._onRequestStateChange (strophe.js:5559)
Logger.js:125 [modules/xmpp/strophe.util.js] <Object.i.Strophe.log>: Strophe: BOSH-Connection failed: host-unknown
i @ Logger.js:125
i.Strophe.log @ strophe.util.js:90
error @ strophe.js:2083
_connect_cb @ strophe.js:5291
_connect_cb @ strophe.js:3910
_onRequestStateChange @ strophe.js:5559
XMLHttpRequest.send (async)
(anonymous) @ VM40:1
l @ strophe.js:5662
_processRequest @ strophe.js:5677
_throttledRequestHandler @ strophe.js:5823
_connect @ strophe.js:5170
connect @ strophe.js:3051
value @ xmpp.js:329
value @ xmpp.js:389
(anonymous) @ authenticateAndUpgradeRole.js:137
o @ authenticateAndUpgradeRole.js:76
X.authenticateAndUpgradeRole @ JitsiConference.js:377
(anonymous) @ AuthHandler.js:165
submit @ LoginDialog.js:80
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
trigger @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
each @ jquery.min.js:2
each @ jquery.min.js:2
trigger @ jquery.min.js:2
(anonymous) @ jquery-impromptu.js:265
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
trigger @ jquery.min.js:2
(anonymous) @ jquery.min.js:2
each @ jquery.min.js:2
each @ jquery.min.js:2
trigger @ jquery.min.js:2
S.fn.(anonymous function) @ jquery.min.js:2
(anonymous) @ jquery-impromptu.js:312
dispatch @ jquery.min.js:2
y.handle @ jquery.min.js:2
Logger.js:125 [modules/xmpp/xmpp.js] <t.value>: (TIME) Strophe connfail[host-unknown]: 34724.73000001628
Logger.js:125 [modules/xmpp/xmpp.js] <t.value>: (TIME) Strophe disconnected[host-unknown]: 34731.17499996442
Logger.js:125 [modules/UI/authentication/AuthHandler.js] <>: authenticateAndUpgradeRole failed {connectionError: “connection.otherError”, credentials: undefined, message: “host-unknown”}

  • prosody:
    Feb 26 12:23:00 mod_bosh info New BOSH session, assigned it sid ‘016d46b6-3f5f-4ba4-a9c8-9703d4e92d96’
    Feb 26 12:23:01 bosh016d46b6-3f5f-4ba4-a9c8-9703d4e92d96 info Authenticated as
  • jicofo:
    Jicofo 2019-02-26 12:26:55.530 INFO: [241] org.jitsi.jicofo.xmpp.FocusComponent.handleConferenceIq().402 Focus request for room:

What does the xmpp error package looks like?
What are the prosody debug logs?

I am not sure what “xmpp error package looks like” means, can you elaborate a bit?
And I attached the debug log for prosody.
prosody.txt (42.1 KB)
ps: thanks for helping me

Here it is one xmpp package from my bosh connection, the thing is you need to find your error one …

One more thing, have you tried configuring this without wordpress?
Make sure you have something working which then you can modify, so you can narrow any problems and not debugging several problems at ounce.

If I revert to internal, it is working. But then, I’d have to sync two databases…

No, I meant just to check with you, whether you have a working configuration, cause I was not sure whether you are hitting some other config error.
Was you able to find the network tab in developer tools?

  1. <body xmlns:stream=“” xmlns=“” sid=“3522c3c7-84cf-42e4-bf37-5b515597043a”>

  2. <iq xmlns=“jabber:client” type=“error” to=“” from=“” id=“fcb72ecc-0201-441b-a5fc-16d51bf9fc23:sendIQ”>

  3. <error type=“auth”>

  4. <not-authorized xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>

  5. <text xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas” xml:lang=“en”>not authorized user domain</text>

  6. </error>

  7. </iq>

  8. </body>

Now it hit me…
username is in form, but the jitsi meet was installed with
Might this be an issue? Is it expecting

Yep. There is a setting in jicofo which checks the auth domain. Try changing that (restaring jicofo) and see how it goes. ?
Do I need to change in other places?

I can’t find the right combo of settings…

Try this first, is it the same?

Yes, I tried several changes, but I don’t really know what settings means what…hostname is, but the users all are, all the components and certificates are made with…and so on…

Copy config and create a virtualhost in prosody that is and configure it for wordpress.
Leave and change config.js to say

hosts: {
        domain: '',

Leave everything else as it is. Does it work like that?

I’ll try tomorrow, got busy today…