Browse Source

Merge branch 'main' into dev

feature/join_times
Stephan Richter 2 months ago
parent
commit
c5a1463235
  1. 9
      frontend/src/Components/Login.svelte

9
frontend/src/Components/Login.svelte

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

Loading…
Cancel
Save