Merge branch 'main' into dev
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user