Some tests.

master
Håvar Aambø Fosstveit 2019-10-24 09:26:34 +02:00
parent bf754d4797
commit 263cdb7430
3 changed files with 26 additions and 15 deletions

View File

@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Multiparty Meeting</title>
</head>
<body>
<script type='text/javascript'>
window.opener.receiveFromChildWindow('Data from child window!');
window.close();
</script>
</body>
</html>

View File

@ -0,0 +1,21 @@
export default (data) =>
{
const html = `<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<title>Multiparty Meeting</title>
</head>
<body>
<script type='text/javascript'>
let data = ${data};
window.opener.CLIENT.receiveFromChildWindow(data);
window.close();
</script>
</body>
</html>`;
return html;
};

View File

@ -16,6 +16,7 @@ const Logger = require('./lib/Logger');
const Room = require('./lib/Room'); const Room = require('./lib/Room');
const base64 = require('base-64'); const base64 = require('base-64');
const helmet = require('helmet'); const helmet = require('helmet');
const httpHelper = require('./httpHelper');
// auth // auth
const passport = require('passport'); const passport = require('passport');
const { Issuer, Strategy } = require('openid-client'); const { Issuer, Strategy } = require('openid-client');
@ -297,7 +298,10 @@ async function setupAuth(oidcIssuer)
}); });
} }
res.sendFile(`${__dirname}/public/authCallback.html`); res.send(httpHelper({
displayName : displayName,
picture : photo
}));
} }
); );
} }