From 0410a6b3be82a41457275e4d1ce879dea146e092 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Mon, 7 Sep 2020 19:23:36 +0300 Subject: [PATCH] Use Jitsi domain in the JWT issuer --- src/vector/jitsi/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 48a0cd020..73c561bcc 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -167,8 +167,10 @@ function createJWTToken() { const header = {alg: 'HS256', typ: 'JWT'}; // Payload const payload = { - // TODO change this to refer to spec? - iss: 'app_id', + // As per Jitsi token auth, `iss` needs to be set to something agreed between + // JWT generating side and Prosody config. Since we have no configuration for + // the widgets, we can't set one anywhere. Using the Jitsi domain here probably makes sense. + iss: jitsiDomain, sub: jitsiDomain, aud: `https://${jitsiDomain}`, room: "*",