From ddfc524fcb29778c589fd9b8d2b99196e0276287 Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Tue, 20 Jul 2021 17:57:07 +0100 Subject: [PATCH] Fixing callback URLs. --- .../builder/portal/manage/auth/index.svelte | 45 +++++++------------ 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte index fa987cd51b..2a962aa062 100644 --- a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte @@ -29,30 +29,23 @@ const ConfigTypes = { Google: "google", OIDC: "oidc", - // Github: "github", - // AzureAD: "ad", } - const GoogleConfigFields = { - Google: ["clientID", "clientSecret", "callbackURL"], - } - const GoogleConfigLabels = { - Google: { - clientID: "Client ID", - clientSecret: "Client secret", - callbackURL: "Callback URL", - }, + $: GoogleConfigFields = { + Google: [ + {name: "clientID", label: "Client ID"}, + {name: "clientSecret", label: "Client secret"}, + {name: "callbackURL", label: "Callback URL", readonly: true, placeholder: `/api/admin/auth/${tenantId}/google/callback`}, + ], } - const OIDCConfigFields = { - Oidc: ["configUrl", "clientID", "clientSecret"], - } - const OIDCConfigLabels = { - Oidc: { - configUrl: "Config URL", - clientID: "Client ID", - clientSecret: "Client Secret", - }, + $: OIDCConfigFields = { + Oidc: [ + {name: "configUrl", label: "Config URL"}, + {name: "clientID", label: "Client ID"}, + {name: "clientSecret", label: "Client Secret"}, + {name: "callbackURL", label: "Callback URL", readonly: true, placeholder: `/api/admin/auth/${tenantId}/oidc/callback`}, + ], } let iconDropdownOptions = [ @@ -292,8 +285,8 @@ {#each GoogleConfigFields.Google as field}
- - + +
{/each}
@@ -332,14 +325,10 @@ {#each OIDCConfigFields.Oidc as field}
- - + +
{/each} -
- - -

To customize your login button, fill out the fields below.