JWT Only Moderator Needs Token to Get In

On another long post akalana said:

“I’ve enabled the token base. What my requirement is, only the moderator should log by using the token. For the other participants, they should be able to access without token. I’ve made the changes as I’ve mentioned below. But my requirement wasn’t successful. What happened for me is disable of the token flow. Can you support me to get this successful?”

To which Osama_Hamzah added

"I am not sure what is the scenario that you trying to run, but the moderator needs to use his token to login to the room first, then the participants can join the same room.

Otherwise it would not work."

To which damencho commented:

“Remove anonymousdomain from config.js and add allow_empty_token = true; to VirtualHost "jitsi.videocec.net" . Those that use token will be moderators and the rest will be guests.
You may want to also set enableUserRolesBasedOnToken: true in config.js.”

To which akalana asked?

“Thank you very much for the quick response. And also should I remove guest virtual host ( guest.jitsi.videocec.net ) from the prosody as well?”

To which damencho commented:


I want guests to be able to enter and use a room without a moderator being present, but when the moderator joins, he is automatically made moderator.

So I commented out the guest VH and made the other changes damencho suggested, and everything works, but I want to know if this is the way it is meant to work??

Should I have removed the guest VH?

No need to the guest VH in you case

In another scenario, What if I wanted to throw up a login screen whenever anyone wanted to try to access the room without a token. What would me settings look like in that instance?

Thanks for your replies, by the way.


Ah hah, simple enough. Thanks so much.