-
- {t("idpAutoProvisionUsersDescription")}
-
{form.watch("autoProvision") && (
{t.rich(
diff --git a/src/app/admin/idp/create/page.tsx b/src/app/admin/idp/create/page.tsx
index 5039d255c..82036c510 100644
--- a/src/app/admin/idp/create/page.tsx
+++ b/src/app/admin/idp/create/page.tsx
@@ -22,6 +22,7 @@ import {
FormMessage
} from "@app/components/ui/form";
import HeaderTitle from "@app/components/SettingsSectionTitle";
+import IdpAutoProvisionUsersDescription from "@app/components/IdpAutoProvisionUsersDescription";
import { SwitchInput } from "@app/components/SwitchInput";
import { Alert, AlertDescription, AlertTitle } from "@app/components/ui/alert";
import { Button } from "@app/components/ui/button";
@@ -94,8 +95,7 @@ export default function Page() {
const watchedType = form.watch("type");
const templatesLocked =
- !templatesPaid &&
- (watchedType === "google" || watchedType === "azure");
+ !templatesPaid && (watchedType === "google" || watchedType === "azure");
async function onSubmit(data: CreateIdpFormValues) {
if (
@@ -223,7 +223,9 @@ export default function Page() {
-
- {t(
- "idpAutoProvisionUsersDescription"
- )}
-
@@ -251,391 +248,409 @@ export default function Page() {
disabled={templatesLocked}
className="min-w-0 border-0 p-0 m-0 disabled:pointer-events-none disabled:opacity-60"
>
- {watchedType === "google" && (
-
-
-
- {t("idpGoogleConfigurationTitle")}
-
-
- {t("idpGoogleConfigurationDescription")}
-
-
-
-
-
-
-
-
-
- )}
-
- {watchedType === "azure" && (
-
-
-
- {t("idpAzureConfigurationTitle")}
-
-
- {t("idpAzureConfigurationDescription")}
-
-
-
-
-
-
-
-
-
- )}
-
- {watchedType === "oidc" && (
-
+ {watchedType === "google" && (
- {t("idpOidcConfigure")}
+ {t("idpGoogleConfigurationTitle")}
- {t("idpOidcConfigureDescription")}
+ {t("idpGoogleConfigurationDescription")}
-
-
+ (
+
+
+ {t(
+ "idpClientSecret"
+ )}
+
+
+
+
+
+ {t(
+ "idpGoogleClientSecretDescription"
+ )}
+
+
+
+ )}
+ />
+
+
+
+ )}
+ {watchedType === "azure" && (
- {t("idpToken")}
+ {t("idpAzureConfigurationTitle")}
- {t("idpTokenDescription")}
+ {t("idpAzureConfigurationDescription")}
-
-
+ (
+
+
+ {t(
+ "idpClientSecret"
+ )}
+
+
+
+
+
+ {t(
+ "idpAzureClientSecretDescription2"
+ )}
+
+
+
+ )}
+ />
+
+
+
-
- )}
+ )}
+
+ {watchedType === "oidc" && (
+
+
+
+
+ {t("idpOidcConfigure")}
+
+
+ {t("idpOidcConfigureDescription")}
+
+
+
+
+
+ (
+
+
+ {t("idpClientId")}
+
+
+
+
+
+ {t(
+ "idpClientIdDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t(
+ "idpClientSecret"
+ )}
+
+
+
+
+
+ {t(
+ "idpClientSecretDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t("idpAuthUrl")}
+
+
+
+
+
+ {t(
+ "idpAuthUrlDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t("idpTokenUrl")}
+
+
+
+
+
+ {t(
+ "idpTokenUrlDescription"
+ )}
+
+
+
+ )}
+ />
+
+
+
+
+
+
+
+
+ {t("idpToken")}
+
+
+ {t("idpTokenDescription")}
+
+
+
+
+
+ (
+
+
+ {t(
+ "idpJmespathLabel"
+ )}
+
+
+
+
+
+ {t(
+ "idpJmespathLabelDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t(
+ "idpJmespathEmailPathOptional"
+ )}
+
+
+
+
+
+ {t(
+ "idpJmespathEmailPathOptionalDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t(
+ "idpJmespathNamePathOptional"
+ )}
+
+
+
+
+
+ {t(
+ "idpJmespathNamePathOptionalDescription"
+ )}
+
+
+
+ )}
+ />
+
+ (
+
+
+ {t(
+ "idpOidcConfigureScopes"
+ )}
+
+
+
+
+
+ {t(
+ "idpOidcConfigureScopesDescription"
+ )}
+
+
+
+ )}
+ />
+
+
+
+
+
+ )}
diff --git a/src/components/AutoProvisionConfigWidget.tsx b/src/components/AutoProvisionConfigWidget.tsx
index 59849989a..d4df3f50d 100644
--- a/src/components/AutoProvisionConfigWidget.tsx
+++ b/src/components/AutoProvisionConfigWidget.tsx
@@ -1,14 +1,12 @@
"use client";
+import IdpAutoProvisionUsersDescription from "@app/components/IdpAutoProvisionUsersDescription";
import { FormDescription } from "@app/components/ui/form";
import { SwitchInput } from "@app/components/SwitchInput";
import { useTranslations } from "next-intl";
import { usePaidStatus } from "@app/hooks/usePaidStatus";
import { tierMatrix } from "@server/lib/billing/tierMatrix";
-import {
- MappingBuilderRule,
- RoleMappingMode
-} from "@app/lib/idpRoleMapping";
+import { MappingBuilderRule, RoleMappingMode } from "@app/lib/idpRoleMapping";
import RoleMappingConfigFields from "@app/components/RoleMappingConfigFields";
type Role = {
@@ -60,9 +58,6 @@ export default function AutoProvisionConfigWidget({
onCheckedChange={onAutoProvisionChange}
disabled={!isPaidUser(tierMatrix.autoProvisioning)}
/>
-
- {t("idpAutoProvisionUsersDescription")}
-
{autoProvision && (
diff --git a/src/components/IdpAutoProvisionUsersDescription.tsx b/src/components/IdpAutoProvisionUsersDescription.tsx
new file mode 100644
index 000000000..6839ff245
--- /dev/null
+++ b/src/components/IdpAutoProvisionUsersDescription.tsx
@@ -0,0 +1,29 @@
+"use client";
+
+import { useTranslations } from "next-intl";
+
+const AUTO_PROVISION_DOCS_URL =
+ "https://docs.pangolin.net/manage/identity-providers/auto-provisioning";
+
+type IdpAutoProvisionUsersDescriptionProps = {
+ className?: string;
+};
+
+export default function IdpAutoProvisionUsersDescription({
+ className
+}: IdpAutoProvisionUsersDescriptionProps) {
+ const t = useTranslations();
+ return (
+