Merge branch 'main' into dev

This commit is contained in:
2025-08-31 14:56:27 +02:00

View File

@@ -36,7 +36,9 @@
}
async function redirectTo(service){
async function redirectTo(e,service){
const btn = e.target;
btn.disabled = true;
const url = api(`user/oidc/redirect/${service}`);
const resp = await fetch(url,{credentials:'include'});
if (resp.ok){
@@ -46,6 +48,9 @@
delete json.authorization_endpoint;
location.href = endpoint + '?' + new URLSearchParams(json);
}
} else {
error = resp.text();
btn.disabled = false;
}
}
@@ -99,6 +104,6 @@
<fieldset>
<legend>{t('oidc_Login')}</legend>
{#each services as service,i}
<button onclick={() => redirectTo(service)}>{service}</button>
<button onclick={e => redirectTo(e,service)}>{service}</button>
{/each}
</fieldset>