From 85268f52ac8481725682defc344f281a3f890f2e Mon Sep 17 00:00:00 2001 From: Miroslav Pejic Date: Mon, 2 Jun 2025 00:41:39 +0200 Subject: [PATCH] [mirotalksfu] - make username from OIDC configurable via .env --- .env.template | 3 +++ app/src/Server.js | 2 +- app/src/config.template.js | 6 +++--- package.json | 2 +- public/js/Brand.js | 2 +- public/js/Room.js | 4 ++-- public/js/RoomClient.js | 2 +- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.env.template b/.env.template index dd040022..c106da7c 100644 --- a/.env.template +++ b/.env.template @@ -92,6 +92,9 @@ OIDC_BASE_URL= # OIDC base URL es https://you OIDC_CLIENT_ID=clientID # OIDC client ID OIDC_CLIENT_SECRET=clientSecret # OIDC client secret OIDC_SECRET=mirotalksfu-oidc-secret # OIDC secret +OIDC_USERNAME_FORCE=true # Force the username to match OIDC email or name (true|false) +OIDC_USERNAME_AS_EMAIL=true # Set username as email from OIDC (true|false) +OIDC_USERNAME_AS_NAME=false # Set username as name from OIDC (true|false) # Host protection HOST_PROTECTED=false # Enable host protection (true|false) diff --git a/app/src/Server.js b/app/src/Server.js index dfdd33b7..059d8045 100644 --- a/app/src/Server.js +++ b/app/src/Server.js @@ -64,7 +64,7 @@ dev dependencies: { * @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon * @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970 * @author Miroslav Pejic - miroslav.pejic.85@gmail.com - * @version 1.8.56 + * @version 1.8.57 * */ diff --git a/app/src/config.template.js b/app/src/config.template.js index 08ae5125..87b81461 100644 --- a/app/src/config.template.js +++ b/app/src/config.template.js @@ -328,9 +328,9 @@ module.exports = { // User identity requirements peer_name: { - force: true, // Require identity provider authentication - email: true, // Request email claim - name: false, // Don't require full name + force: process.env.OIDC_USERNAME_FORCE !== 'false', // Require identity provider authentication + email: process.env.OIDC_USERNAME_AS_EMAIL !== 'false', // Request email claim + name: process.env.OIDC_USERNAME_AS_NAME === 'true', // Don't require full name }, // Provider configuration diff --git a/package.json b/package.json index 4b45e177..f5291518 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mirotalksfu", - "version": "1.8.56", + "version": "1.8.57", "description": "WebRTC SFU browser-based video calls", "main": "Server.js", "scripts": { diff --git a/public/js/Brand.js b/public/js/Brand.js index 2bd3efca..04f15e0c 100644 --- a/public/js/Brand.js +++ b/public/js/Brand.js @@ -64,7 +64,7 @@ let BRAND = { }, about: { imageUrl: '../images/mirotalk-logo.gif', - title: 'WebRTC SFU v1.8.56', + title: 'WebRTC SFU v1.8.57', html: `