Joachim Van Herwegen a47f5236ef feat: Full rework of account management
Complete rewrite of the account management and related systems.
Makes the architecture more modular,
allowing for easier extensions and configurations.
2023-10-06 11:04:40 +02:00

13 lines
417 B
Plaintext

<script>
// Redirect to the account page if logged in, if not: redirect to the login page
(async() => {
const controls = await fetchControls('<%= idpIndex %>');
if (<%= authenticating %>) {
const body = await fetchJson(controls.oidc.prompt);
location.href = body.location;
} else {
location.href = controls.html?.account?.account ?? controls.html.main.login;
}
})();
</script>