<html style="minHeight: 100%; position: relative">
<body id="localhost" style="height: 100vh; margin: 0">
<iframe id="xund-iframe" style="width: 100%; height: calc(100vh - 54px); overflow:scroll; border: none; margin:0 auto;" title="XUND Application Frame"></iframe>
<script type="text/javascript">
const XUND_AUTH_BASE_URL = "https://identity-management.class2.xund.solutions/api";
const XUND_APP_BASE_URL = "https://frame.webapp.class2.xund.solutions/034b7d46-0e1a-4fe1-86ee-121f3238ae84";
const CLIENT_ID = "8afe9046-e548-4167-8af8-133df33b61e7";
;(async () => {
const clientId = CLIENT_ID
const authCode = crypto.randomUUID?.() ?? crypto.getRandomValues(new Uint32Array(40)).join('')
await fetch(`${XUND_AUTH_BASE_URL}/authorize?clientId=${clientId}&authCode=${authCode}`)
document.getElementById(
'xund-iframe',
).src = `${XUND_AUTH_BASE_URL}/token?clientId=${clientId}&authCode=${authCode}&redirectUri=${encodeURIComponent(
XUND_APP_BASE_URL,
)}`
})()
</script>
</body>
</html>