[mirotalk] - retrieve username as name from OIDC if enabled, update dep
This commit is contained in:
+3
-2
@@ -45,7 +45,7 @@ dependencies: {
|
||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.16
|
||||
* @version 1.5.17
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -488,9 +488,10 @@ if (OIDC.enabled) {
|
||||
// Route to display user information
|
||||
app.get('/profile', OIDCAuth, (req, res) => {
|
||||
if (OIDC.enabled) {
|
||||
log.debug('OIDC User profile requested', req.oidc.user);
|
||||
return res.json(req.oidc.user); // Send user information as JSON
|
||||
}
|
||||
res.sendFile(views.notFound);
|
||||
return res.json({ profile: false });
|
||||
});
|
||||
|
||||
// Authentication Callback Route
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mirotalk",
|
||||
"version": "1.5.16",
|
||||
"version": "1.5.17",
|
||||
"description": "A free WebRTC browser-based video call",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
@@ -43,7 +43,7 @@
|
||||
"dependencies": {
|
||||
"@mattermost/client": "10.8.0",
|
||||
"@ngrok/ngrok": "1.5.1",
|
||||
"@sentry/node": "^9.24.0",
|
||||
"@sentry/node": "^9.25.1",
|
||||
"axios": "^1.9.0",
|
||||
"chokidar": "^4.0.3",
|
||||
"colors": "^1.4.0",
|
||||
@@ -61,7 +61,7 @@
|
||||
"jsonwebtoken": "^9.0.2",
|
||||
"js-yaml": "^4.1.0",
|
||||
"nodemailer": "^7.0.3",
|
||||
"openai": "^5.0.1",
|
||||
"openai": "^5.1.0",
|
||||
"qs": "^6.14.0",
|
||||
"socket.io": "^4.8.1",
|
||||
"swagger-ui-express": "^5.0.1",
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ let brand = {
|
||||
},
|
||||
about: {
|
||||
imageUrl: '../images/mirotalk-logo.gif',
|
||||
title: 'WebRTC P2P v1.5.16',
|
||||
title: 'WebRTC P2P v1.5.17',
|
||||
html: `
|
||||
<button
|
||||
id="support-button"
|
||||
|
||||
+17
-2
@@ -15,7 +15,7 @@
|
||||
* @license For commercial use or closed source, contact us at license.mirotalk@gmail.com or purchase directly from CodeCanyon
|
||||
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-p2p-webrtc-realtime-video-conferences/38376661
|
||||
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
|
||||
* @version 1.5.16
|
||||
* @version 1.5.17
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1435,6 +1435,19 @@ async function getButtons() {
|
||||
}
|
||||
}
|
||||
|
||||
async function getUserName() {
|
||||
try {
|
||||
const { data: profile } = await axios.get('/profile', { timeout: 5000 });
|
||||
if (profile && profile.name) {
|
||||
console.log('AXIOS GET OIDC Profile retrieved successfully', profile);
|
||||
window.localStorage.peer_name = profile.name;
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('AXIOS OIDC Error fetching profile', error.message || error);
|
||||
}
|
||||
return window.localStorage.peer_name || '';
|
||||
}
|
||||
|
||||
/**
|
||||
* set your name for the conference
|
||||
*/
|
||||
@@ -1503,6 +1516,8 @@ async function whoAreYou() {
|
||||
|
||||
initVideoContainerShow(myVideoStatus);
|
||||
|
||||
window.localStorage.peer_name = await getUserName();
|
||||
|
||||
Swal.fire({
|
||||
allowOutsideClick: false,
|
||||
allowEscapeKey: false,
|
||||
@@ -11149,7 +11164,7 @@ function showAbout() {
|
||||
Swal.fire({
|
||||
background: swBg,
|
||||
position: 'center',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.5.16',
|
||||
title: brand.about?.title && brand.about.title.trim() !== '' ? brand.about.title : 'WebRTC P2P v1.5.17',
|
||||
imageUrl: brand.about?.imageUrl && brand.about.imageUrl.trim() !== '' ? brand.about.imageUrl : images.about,
|
||||
customClass: { image: 'img-about' },
|
||||
html: `
|
||||
|
||||
Reference in New Issue
Block a user