miroslavpejic85/mirotalksfu

"Keep room name through authentication" feature only works for some URL formats

rawtaz opened this issue · 3 comments

rawtaz commented

Describe the bug

I'm afraid the newly added feature suggested in #124 isn't working entirely, at least from what I can tell:

  • If I go to http://mydomain.com/join/test or http://mydomain.com/join?room=test I get the authentication page, enter valid credentials, and is then redirected to http://mydomain.com/logged?room= (yes, the room name is missing), so I still have to enter the room name manually.
  • If I go to http://mydomain.com/?room=test it works - I get the authentication page, enter valid credentials, and is then redirected to http://mydomain.com/logged?room=test, so that I don't have to enter the room name manually.

To Reproduce

Steps to reproduce the behavior:

  1. Go to http://mydomain.com/join/test or http://mydomain.com/join?room=test in a MiroTalk SFU instance that is protected by a username and password.
  2. Enter a valid username and password to authenticate.
  3. Notice that instead of being redirected to http://mydomain.com/logged?room=test (not having to enter a room name) you end up on http://mydomain.com/join?room= (having to enter a room name).

Expected behavior

Accessing the instance using either of http://mydomain.com/join/test, http://mydomain.com/join?room=test and http://mydomain.com/?room=test should let you not have to enter the room name after authentication (since the room name is already supplied in the URL).

Screenshots

N/A

Desktop - Mobile

Please complete the following information:

  • Device or OS: macOS
  • Browser: Chrome, Safari
  • Version: Latest

Additional context

The reason I expect not only the http://mydomain.com/?room=test URL format to work but also http://mydomain.com/join/test and http://mydomain.com/join?room=test is that the last one of these is described as supported under "Direct join" in the README.md and the second-to-last is the one you get as the link to share with others once you joined a room. So I don't see why these would not support the feature at hand as well.

Hi @rawtaz, I should have fixed it.

When host protection is enabled, the URL format for direct room access after authentication should be as follows:

  • https://mydomain.com/?room=test

After host authentication, participants can join the room using any of the following URL formats:

  • https://mydomain.com/join/test
  • https://mydomain.com/join/?room=test
  • https://mydomain.com/join/?room=test&password=0&name=mirotalksfu&audio=0&video=0&screen=0&notify=0
rawtaz commented

Hi,

Thanks for the explanation. I have some feedback on that though:

  • What is the point of having two of the URL formats work only after the visitor is already authenticated?
  • It's not great UX in the following way:
    • Imagine you (as the inviter of an ad-hoc meeting) go to your instance, log in, enter a room name and your own name.
    • Then when entering the room you get the Sharing dialog, in which you can very easily copy the link to the meeting.
    • This list has the format https://mydomain.com/join/test, not the https://mydomain.com/?room=test one.
    • Naturally, you want to just click the button to copy https://mydomain.com/join/test and share that with your expected participants.
    • This doesn't currently work though, because when they use that link, they will still end up at the "enter room name" page after authenticating.
    • The alternative you have to fix that is to edit/hand-craft the URL to be the https://mydomain.com/?room=test format, which takes away the point of things (in this case it's easier to instead just tell participants to log in and then enter the room name themselves).

Is it complicated to make all three URL formats work with the "Keep room name through authentication" feature?

Hi @rawtaz,

The inclusion of two URL formats, one with a simple path and another with query parameters, serves the purpose of offering flexibility to accommodate various usage scenarios. Let me elaborate:

  1. https://mydomain.com/join/test: This format allows users to join the 'test' room while providing them with the option to configure their camera, audio, screen settings, and name before entering the room.

  2. https://mydomain.com/join/?room=test&password=0&name=mirotalksfu&audio=0&video=0&screen=0&notify=0: This format enables users to directly join the 'test' room by specifying their preferences through query parameters.

Here's a breakdown of the parameters:
- room: Specifies the room name or identifier.
- password: Represents a password used for secure room access (in this case set to 0 == disabled)
- name: Specifies the participant's name (in this example, "mirotalksfu").
- audio: Indicates whether the participant wants to enable audio (0 mean disabled, 1 mean enabled).
- video: Indicates whether the participant wants to enable video (0 mean disabled, 1 mean enabled).
- screen: Indicates whether the participant wants to share their screen (0 mean disabled, 1 mean enabled).
- notify: Inidicates if show or not the room sharing popup when participants join the room (0 mean disabled, 1 mean enabled).

For instance:

  • https://mydomain.com/join/?room=test&name=userNam1
  • https://mydomain.com/join/?room=test&name=userName2&video=0&audio=0
  • https://mydomain.com/join/?room=test&name=userName3&video=0&audio=1
  • https://mydomain.com/join/?room=test&name=userName4&video=1&audio=0
  • https://mydomain.com/join/?room=test&name=userName5&video=1&audio=1
  • ....

You can mix and match these query parameters as needed.

With this approach, users can seamlessly access the desired room using both the simplified URL path (e.g., https://mydomain.com/join/test) and the URL with query parameters, providing greater convenience and adaptability.

if the URL with query parameters is not needed for your specific use case, you can simply use the more basic URL format https://maindomain.com/join/test.

Try it now, I have made some further changes, if you encounter any issues, as soon as I have a little more time I will take a more in-depth look at them.