Skip to content

feat(logout): Add option to send userId and meetingId to logoutURL - #20965

Closed
lfzawacki wants to merge 1 commit into
bigbluebutton:v3.0.x-releasefrom
lfzawacki:v3.0.x-release
Closed

lfzawacki wants to merge 1 commit into
bigbluebutton:v3.0.x-releasefrom
lfzawacki:v3.0.x-release

Conversation

@lfzawacki

@lfzawacki lfzawacki commented Aug 16, 2024 •

Copy link
Copy Markdown
Contributor

This is used by the upcoming custom feedback app together with the logoutURL functionality.

Here's an example of the logoutURL we'd configure in bigbluebutton-web/grails-app/conf/bigbluebutton.properties:

bigbluebutton.web.logoutURL=${bigbluebutton.web.serverURL}/feedback?meetingID=%%MEETINGID%%&userID=%%USERID%%

The %%MEETINGID%% and %%USERID%% parameters can be used as templates that will be substituted by the time the user is redirected after they leave the meeting. The currently implemented parameters are:

%%MEETINGID%% : The current meeting's internal meeting ID

%%USERID%% : The current user's internal user ID

%%USERNAME%% : The current user's name

These parameters might change or be updated in the future.

@gustavotrott

Copy link
Copy Markdown
Contributor

what if the logoutURL allow some placeholders? similar to welcomeMessage.
it would be something like http://bigbluebutton.example.com/logout?id=%%USERID%%&meeting=%%MEETINGID%%.

I would like this more than a new setting! And it's more versatile!

@lfzawacki

Copy link
Copy Markdown
Contributor Author

I think it's pretty cool to have as a feature, but I'm not sure how to best implement it. Do you think we could specify this a little better and do it in a future PR? We're currently testing our Custom Feedback application that uses this feature and it will soon be open sourced. I think we could go from there

@gustavotrott

gustavotrott commented Aug 23, 2024 •

Copy link
Copy Markdown
Contributor

Once it can include user infos, I think the best place is in the client, the same place you changed.
But it would be as simple as:

const confirmRedirect = (isBreakout: boolean, allowRedirect: boolean) => {
  if (isBreakout) window.close();
  if (allowRedirect) {
    let logoutUrlWithParams = logoutUrl;
    logoutUrlWithParams = logoutUrlWithParams.replaceAll('%%USERID%%', userId);
    logoutUrlWithParams = logoutUrlWithParams.replaceAll('%%USERNAME%%', userName);
    logoutUrlWithParams = logoutUrlWithParams.replaceAll('%%MEETINGID%%', meetingId);
    window.location.href = logoutUrlWithParams;
  }
};

@lfzawacki

Copy link
Copy Markdown
Contributor Author

Okay, I think I can do that. I'll add some documentation to the PR description as well

@lfzawacki
lfzawacki marked this pull request as ready for review August 23, 2024 19:34
@gustavotrott

Copy link
Copy Markdown
Contributor

I believe creating a new includeDataOnLogout config is unnecessary. If the admin has included placeholders in the logoutURL, it indicates their intention to include data.

@lfzawacki

Copy link
Copy Markdown
Contributor Author

Since the code ended up being very small we might want to squash merge the commits

@sonarqubecloud

Copy link
Copy Markdown

@lfzawacki lfzawacki closed this Aug 26, 2024
@github-actions

Copy link
Copy Markdown

Automated tests Summary

⏳ Tests are running...

lfzawacki added a commit to lfzawacki/bigbluebutton that referenced this pull request Nov 11, 2024
This fixes a few cases that could result in 500 errors when using templated logoutUrl (after bigbluebutton#20965)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants