miroslavpejic85 / mirotalksfu

🏆 WebRTC - SFU - Simple, Secure, Scalable Real-Time Video Conferences Up to 8k, compatible with all browsers and platforms.
https://sfu.mirotalk.com
GNU Affero General Public License v3.0
2.15k stars 340 forks source link

Reconnection of guests impossibile when host.protected set to true #175

Closed benjiworld closed 1 week ago

benjiworld commented 1 week ago

Describe the bug

The first connection of a guest, (after the login of the presenter via username and password) works. The reconnection of the same guest, in the case of previous disconnection, doesn't work (while the presenter is still logged in). Trying reconnecting the "who are you" page is presented, and no way to join the room anymore. Furthermore, the "sharing link" is wrong. In fact the link is https://owndomain.com/join/RoomName brings the guest to the "who are you" page, the correct link should be https://owndomain/join?room=RoomName

Steps to reproduce

  1. Use of self-hosted Mirotalk via docker compose.
  2. Customization of app/src/config.js
  3. Set host.protected to true
  4. Create an user (presenter) filling username and password
  5. Login via web-browser by the presenter
  6. Create a room and share the "correct" link to guests
  7. Wait for guest to login
  8. Logout of guest and try to re-login

Expected behavior

  1. The sharing link should be in the correct form, for quick forwarding;
  2. Guests should able to login, to logout and re-login without problems

Device

Browser

Relevant log output

No response

Reproducibility

No

Additional context

Obviously impossible to reproduce on sfu.mirotalk.

benjiworld commented 1 week ago

After struggling for a while, I think I can reply to myself... The problem of impossible reconnection seems to live on "Redirect" section of app/src/config.js file (line 369). The redirection (when users opt-out) to the default /newroom probably triggers some internal check to force the client to login again. Changing the value to "true" and adding some external web page seems to fix the issue. The wrong shareable link instead is still there.

miroslavpejic85 commented 1 week ago

Furthermore, the "sharing link" is wrong. In fact the link is https://owndomain.com/join/RoomName brings the guest to the "who are you" page, the correct link should be https://owndomain/join?room=RoomName

You are right! Thank you, I'm going to fix it.

miroslavpejic85 commented 1 week ago

@benjiworld, Should be fixed: Docker image build status.

mirotalk-sfu-fix-share-link-host-protected

benjiworld commented 1 week ago

Thank you for the fix. The link is now correct, consider to extend the fix to the link proposed by "Your recent Room" in home page as well, because it still shows the old link. Furthermore, just notice that without the hint about the redirect section (see my first comment) the simple guest (no username and password) can still not re-login. Thanks a lot for this great app...