feat(iam): added a security policy that allows setting domain name verification for passing tokens

pull/100/head
moonrailgun 2 years ago
parent 28b6e54edf
commit 9ae787f42b

@ -138,12 +138,14 @@ class IAMService extends TcService {
} }
function generatePostMessageHtml(obj: Record<string, any>) { function generatePostMessageHtml(obj: Record<string, any>) {
const IAM_FE_URL = process.env.IAM_FE_URL || '*';
return { return {
__raw: true, __raw: true,
html: `<script>window.opener.postMessage(${JSON.stringify({ html: `<script>window.opener.postMessage(${JSON.stringify({
source: 'plugin:com.msgbyte.iam', source: 'plugin:com.msgbyte.iam',
...obj, ...obj,
})}, "*");</script><div>Waiting for close</div>`, })}, "${IAM_FE_URL}");</script><div>Waiting for main window close</div>`,
}; };
} }

Loading…
Cancel
Save