From b3de3f5e92203da52cbab20f1276c83c9e0e1a8d Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Tue, 25 Jun 2024 18:23:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(backend)=20add=20LiveKit=20API=20s?= =?UTF-8?q?ecret/key=20pair=20in=20Django=20settings?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When starting the LiveKit server using the '--dev' option, the server uses defaults secret/key pair according to the documentation. Make sure the Django settings and de facto the environment variable match these defaults. Please have a look at the documentation page here: https://docs.livekit.io/home/self-hosting/local/ --- env.d/development/common.dist | 4 ++++ src/backend/impress/settings.py | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/env.d/development/common.dist b/env.d/development/common.dist index 712c4dbd..5dc036fe 100644 --- a/env.d/development/common.dist +++ b/env.d/development/common.dist @@ -39,3 +39,7 @@ LOGOUT_REDIRECT_URL=http://localhost:3000 OIDC_REDIRECT_ALLOWED_HOSTS=["http://localhost:8083", "http://localhost:3000"] OIDC_AUTH_REQUEST_EXTRA_PARAMS={"acr_values": "eidas1"} + +# Livekit Token settings +LIVEKIT_API_SECRET="secret" +LIVEKIT_API_KEY="devkey" diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index c77e7e0e..987be69b 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -369,6 +369,12 @@ class Base(Configuration): ) # Video conference configuration + LIVEKIT_CONFIGURATION = { + "api_key": values.Value(environ_name="LIVEKIT_API_KEY", environ_prefix=None), + "api_secret": values.Value( + environ_name="LIVEKIT_API_SECRET", environ_prefix=None + ), + } DEFAULT_ROOM_IS_PUBLIC = values.BooleanValue( True, environ_name="MAGNIFY_DEFAULT_ROOM_IS_PUBLIC", environ_prefix=None )