diff --git a/packages/builder/src/pages/builder/auth/_components/OIDCButton.svelte b/packages/builder/src/pages/builder/auth/_components/OIDCButton.svelte index 24aca0c396..bae68b6548 100644 --- a/packages/builder/src/pages/builder/auth/_components/OIDCButton.svelte +++ b/packages/builder/src/pages/builder/auth/_components/OIDCButton.svelte @@ -6,7 +6,7 @@ import OktaLogo from "assets/okta-logo.png" import OneLoginLogo from "assets/onelogin-logo.png" - import { oidc, organisation } from "stores/portal" + import { oidc, organisation, auth } from "stores/portal" import { onMount } from "svelte" $: show = $organisation.oidc @@ -31,7 +31,10 @@ {#if show} - window.open(`/api/global/auth/oidc/configs/${$oidc.uuid}`, "_blank")} + window.open( + `/api/global/auth/${$auth.tenantId}/oidc/configs/${$oidc.uuid}`, + "_blank" + )} >
oidc icon diff --git a/packages/worker/src/api/routes/global/auth.js b/packages/worker/src/api/routes/global/auth.js index f85d08057b..5e39f79135 100644 --- a/packages/worker/src/api/routes/global/auth.js +++ b/packages/worker/src/api/routes/global/auth.js @@ -30,7 +30,9 @@ function buildResetUpdateValidation() { } function updateTenant(ctx, next) { - updateTenantId(ctx.params.tenantId) + if (ctx.params) { + updateTenantId(ctx.params.tenantId) + } return next() }