+ {isCreating && (
+ <>
+
{t("common.type")}
+
+
{t("setting.sso-section.template")}
+
+
+ >
+ )}
+
+ {t("common.name")}
+ *
+
+
+ setBasicInfo({
+ ...basicInfo,
+ title: e.target.value,
+ })
+ }
+ />
+
{t("setting.sso-section.identifier-filter")}
+
+ setBasicInfo({
+ ...basicInfo,
+ identifierFilter: e.target.value,
+ })
+ }
+ />
+
+ {type === "OAUTH2" && (
+ <>
+ {isCreating && (
+
+ {t("setting.sso-section.redirect-url")}: {absolutifyLink("/auth/callback")}
+
+ )}
+
+ {t("setting.sso-section.client-id")}
+ *
- )}
-
- {t("setting.sso-section.client-id")}
- *
-
-
setPartialOAuth2Config({ clientId: e.target.value })}
- />
-
- {t("setting.sso-section.client-secret")}
- *
-
-
setPartialOAuth2Config({ clientSecret: e.target.value })}
- />
-
- {t("setting.sso-section.authorization-endpoint")}
- *
-
-
setPartialOAuth2Config({ authUrl: e.target.value })}
- />
-
- {t("setting.sso-section.token-endpoint")}
- *
-
-
setPartialOAuth2Config({ tokenUrl: e.target.value })}
- />
-
- {t("setting.sso-section.user-endpoint")}
- *
-
-
setPartialOAuth2Config({ userInfoUrl: e.target.value })}
- />
-
- {t("setting.sso-section.scopes")}
- *
-
-
setOAuth2Scopes(e.target.value)}
- />
-
-
- {t("setting.sso-section.identifier")}
- *
-
-
- setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, identifier: e.target.value } as FieldMapping })
- }
- />
-
{t("setting.sso-section.display-name")}
-
- setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, displayName: e.target.value } as FieldMapping })
- }
- />
-
{t("common.email")}
-
- setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, email: e.target.value } as FieldMapping })
- }
- />
-
Avatar URL
-
- setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, avatarUrl: e.target.value } as FieldMapping })
- }
- />
- >
- )}
-
+
setPartialOAuth2Config({ clientId: e.target.value })}
+ />
+
+ {t("setting.sso-section.client-secret")}
+ *
+
+
setPartialOAuth2Config({ clientSecret: e.target.value })}
+ />
+
+ {t("setting.sso-section.authorization-endpoint")}
+ *
+
+
setPartialOAuth2Config({ authUrl: e.target.value })}
+ />
+
+ {t("setting.sso-section.token-endpoint")}
+ *
+
+
setPartialOAuth2Config({ tokenUrl: e.target.value })}
+ />
+
+ {t("setting.sso-section.user-endpoint")}
+ *
+
+
setPartialOAuth2Config({ userInfoUrl: e.target.value })}
+ />
+
+ {t("setting.sso-section.scopes")}
+ *
+
+
setOAuth2Scopes(e.target.value)}
+ />
+
+
+ {t("setting.sso-section.identifier")}
+ *
+
+
+ setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, identifier: e.target.value } as FieldMapping })
+ }
+ />
+
{t("setting.sso-section.display-name")}
+
+ setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, displayName: e.target.value } as FieldMapping })
+ }
+ />
+
{t("common.email")}
+
+ setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, email: e.target.value } as FieldMapping })
+ }
+ />
+
Avatar URL
+
+ setPartialOAuth2Config({ fieldMapping: { ...oauth2Config.fieldMapping, avatarUrl: e.target.value } as FieldMapping })
+ }
+ />
+ >
+ )}
+
+
-
-