Auto generate callback url and supply id on login
This commit is contained in:
parent
356a765c92
commit
121a8e5e9a
|
@ -26,7 +26,9 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if show}
|
{#if show}
|
||||||
<ActionButton on:click={() => window.open("/api/admin/auth/oidc/", "_blank")}>
|
<ActionButton
|
||||||
|
on:click={() => window.open(`/api/admin/auth/oidc/${$oidc.uuid}`, "_blank")}
|
||||||
|
>
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<img {src} alt="oidc icon" />
|
<img {src} alt="oidc icon" />
|
||||||
<p>{`Sign in with ${$oidc.name || "OIDC"}`}</p>
|
<p>{`Sign in with ${$oidc.name || "OIDC"}`}</p>
|
||||||
|
|
|
@ -75,9 +75,13 @@
|
||||||
providers.google?.config.clientSecret &&
|
providers.google?.config.clientSecret &&
|
||||||
providers.google?.config.callbackURL
|
providers.google?.config.callbackURL
|
||||||
$: oidcComplete =
|
$: oidcComplete =
|
||||||
providers.oidc?.config.configs[0].configUrl &&
|
providers.oidc?.config?.configs[0].configUrl &&
|
||||||
providers.oidc?.config.configs[0].clientID &&
|
providers.oidc?.config?.configs[0].clientID &&
|
||||||
providers.oidc?.config.configs[0].clientSecret
|
providers.oidc?.config?.configs[0].clientSecret
|
||||||
|
|
||||||
|
$: oidcCallback = providers.oidc?.config.configs[0].uuid
|
||||||
|
? `/api/admin/auth/oidc/callback/${providers.oidc?.config.configs[0].uuid}`
|
||||||
|
: ""
|
||||||
|
|
||||||
async function uploadLogo(file) {
|
async function uploadLogo(file) {
|
||||||
let data = new FormData()
|
let data = new FormData()
|
||||||
|
@ -234,6 +238,10 @@
|
||||||
<Input bind:value={providers.oidc.config.configs[0][field]} />
|
<Input bind:value={providers.oidc.config.configs[0][field]} />
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
|
<div class="form-row">
|
||||||
|
<Label size="L">Callback URL</Label>
|
||||||
|
<Input readonly bind:value={oidcCallback} />
|
||||||
|
</div>
|
||||||
<br />
|
<br />
|
||||||
<Body size="S">
|
<Body size="S">
|
||||||
To customize your login button, fill out the fields below.
|
To customize your login button, fill out the fields below.
|
||||||
|
|
Loading…
Reference in New Issue