fix(idaa): revert JWT to moderators-only pending Jitsi server config
Temporary rollback — non-moderators rejoin anonymously until Prosody is configured with allow_empty_token=false to enforce JWT moderator claims. TODO comment left in place to track the follow-up. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -836,26 +836,31 @@ async function init_jitsi() {
|
|||||||
const url_params = data.params;
|
const url_params = data.params;
|
||||||
|
|
||||||
// --- Initialize Jitsi ---
|
// --- Initialize Jitsi ---
|
||||||
// All verified Novi users get a JWT — not just moderators.
|
// TODO: Issue JWT to all verified Novi users once Jitsi server is configured to enforce
|
||||||
// Without JWT enforcement, the room URL alone is enough to join, which violates IDAA privacy.
|
// JWT auth and respect context.user.moderator (set allow_empty_token = false in Prosody).
|
||||||
// is_moderator is encoded in the token payload by get_jitsi_jwt().
|
// For now, only moderators get a JWT — non-moderators join anonymously.
|
||||||
console.log('Jitsi: Attempting to get JWT...');
|
let jwt_token = null;
|
||||||
const jwt_token = await get_jitsi_jwt(
|
if (is_moderator) {
|
||||||
display_name,
|
console.log('Jitsi: Attempting to get JWT for moderator...');
|
||||||
email,
|
jwt_token = await get_jitsi_jwt(
|
||||||
is_moderator,
|
display_name,
|
||||||
room_name,
|
email,
|
||||||
user_id
|
is_moderator,
|
||||||
);
|
room_name,
|
||||||
if (!jwt_token) {
|
user_id
|
||||||
const container = document.getElementById(jitsi_container_id);
|
);
|
||||||
if (container)
|
if (!jwt_token) {
|
||||||
container.innerHTML =
|
const container = document.getElementById(jitsi_container_id);
|
||||||
'<h1>Authentication Failed. Please try again.</h1>';
|
if (container)
|
||||||
console.error('Jitsi: Authentication failed. JWT not received.');
|
container.innerHTML =
|
||||||
return;
|
'<h1>Authentication Failed. Please try again.</h1>';
|
||||||
|
console.error('Jitsi: Authentication failed. JWT not received.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log('Jitsi: Successfully received JWT.');
|
||||||
|
} else {
|
||||||
|
console.log('Jitsi: Non-moderator joining without JWT (temporary — pending Jitsi server config fix).');
|
||||||
}
|
}
|
||||||
console.log('Jitsi: Successfully received JWT.');
|
|
||||||
|
|
||||||
const disabled_sounds = [
|
const disabled_sounds = [
|
||||||
disable_incoming_msg_sound ? 'INCOMING_MSG_SOUND' : null,
|
disable_incoming_msg_sound ? 'INCOMING_MSG_SOUND' : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user