humhub-contrib / jitsi-meet

6 stars 7 forks source link

Authentication failed with Jitsi Password #11

Closed markushagge closed 4 years ago

markushagge commented 4 years ago

Since the last Jitsi-Update the HumHub-Jitsi-Modul can’t connect to Jitsi-Instances which have activated Password-Protection für creating rooms (following this Howto: [https://jitsi-club.gitlab.io/jitsi-self-hosting/en/01-deployment-howto/01-authentication/] )

When trying to open a room, the message "Authentication failed" appears and there is no possibility, e.g. Activate the video or otherwise start the conference

The problem I think is that the Jitsi-HumHub-Modul always creates rooms with jwt activated, regardless of whether information was given in the options or not. According to the logs from Jitsi the room always is created with attached /?jwt=examplestring Parameter. Older Jitsi-Versions seems to ignore this parameter than no JWT is used, the current version seems to evaluate this and then output it as an error if JWT is not activated

Since I have deactivated this Parameter (in /protected/modules/jitsi-meet/views/room/open.php I have modified the line „(Original x.load("<?= Url::to(['/jitsi-meet/room/modal', 'name' => $name, 'jwt' => $jwt]); ?>"); )“ and deleted the „jwt“) the Jitsi-room-Creation works from inside Humhub and the password inside Jitsi is requested correctly.

This is a solution for me, but in general the JWT parameter should not be generated in the first place if the JWT fields in the module options are empty

fae7em commented 4 years ago

If you don't want to use jwt, just don't fill AppID and AppSecret parameters in the module setting. The problem is in jwt creation step, not in empty jwt, because when you delete jwt in this line : (Original x.load(" $name, 'jwt' => $jwt]); ?>"); you just remove the value of jwt that passed to modalAction. and it still exists in Jitsi call, but without value. So instead of removing this part of code, just don't fill AppID and AppSecret parameters in the module setting.

markushagge commented 4 years ago

If you don't want to use jwt, just don't fill AppID and AppSecret parameters in the module setting.

This ist what i did - there were no entries in the module settings in AppID respectively AppSecret . The "jwt"-Parameter (with value) exists anyway

luke- commented 4 years ago

Would it help if we add a checkbox "Enable JWT Authentication". If this checkbox is activated, the jwt inputs are displayed and marked as required. And only if this JWT authentication is active the parameter be added?

markushagge commented 4 years ago

Sounds like a good solution

luke- commented 4 years ago

@markushagge Can you try the latest Master code?

markushagge commented 4 years ago

@markushagge Can you try the latest Master code?

It works, the conference is opened as expected with an access data request. Thank you so much!

luke- commented 4 years ago

Thanks for testing!