host everywhere

This commit is contained in:
Max Peintner
2025-01-15 09:19:54 +01:00
parent 94e14fdbda
commit c0f6676171
7 changed files with 132 additions and 66 deletions

View File

@@ -2,6 +2,7 @@ import { DynamicTheme } from "@/components/dynamic-theme";
import { getBrandingSettings } from "@/lib/zitadel";
import { IdentityProviderType } from "@zitadel/proto/zitadel/settings/v2/login_settings_pb";
import { getLocale, getTranslations } from "next-intl/server";
import { headers } from "next/headers";
// This configuration shows the given name in the respective IDP button as fallback
const PROVIDER_NAME_MAPPING: {
@@ -22,7 +23,13 @@ export default async function Page(props: {
const { organization } = searchParams;
const branding = await getBrandingSettings(organization);
const host = (await headers()).get("host");
if (!host || typeof host !== "string") {
throw new Error("No host found");
}
const branding = await getBrandingSettings({ host, organization });
return (
<DynamicTheme branding={branding}>