diff --git a/web/app/components/base/form/components/base/base-field.tsx b/web/app/components/base/form/components/base/base-field.tsx
index e48ce780c0..0195f38795 100644
--- a/web/app/components/base/form/components/base/base-field.tsx
+++ b/web/app/components/base/form/components/base/base-field.tsx
@@ -87,7 +87,7 @@ const BaseField = ({
{memorizedLabel}
{
- required && (
+ required && !isValidElement(label) && (
*
)
}
diff --git a/web/app/components/base/form/components/base/base-form.tsx b/web/app/components/base/form/components/base/base-form.tsx
index 7502911a34..ee78561250 100644
--- a/web/app/components/base/form/components/base/base-form.tsx
+++ b/web/app/components/base/form/components/base/base-form.tsx
@@ -5,6 +5,7 @@ import {
} from 'react'
import type {
AnyFieldApi,
+ AnyFormApi,
} from '@tanstack/react-form'
import { useForm } from '@tanstack/react-form'
import type {
@@ -29,6 +30,7 @@ export type BaseFormProps = {
formClassName?: string
ref?: FormRef
disabled?: boolean
+ formFromProps?: AnyFormApi
} & Pick
const BaseForm = ({
@@ -41,10 +43,12 @@ const BaseForm = ({
inputClassName,
ref,
disabled,
+ formFromProps,
}: BaseFormProps) => {
- const form = useForm({
+ const formFromHook = useForm({
defaultValues,
})
+ const form: any = formFromProps || formFromHook
const { getFormValues } = useGetFormValues(form)
const { getValidators } = useGetValidators()
@@ -102,10 +106,6 @@ const BaseForm = ({
return (
diff --git a/web/app/components/base/form/form-scenarios/auth/index.tsx b/web/app/components/base/form/form-scenarios/auth/index.tsx
index 5a88f94ac6..3927f90959 100644
--- a/web/app/components/base/form/form-scenarios/auth/index.tsx
+++ b/web/app/components/base/form/form-scenarios/auth/index.tsx
@@ -6,6 +6,7 @@ const AuthForm = ({
formSchemas = [],
defaultValues,
ref,
+ formFromProps,
}: BaseFormProps) => {
return (
)
}
diff --git a/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx b/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx
index 733ebbd945..ad15a37d5c 100644
--- a/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx
+++ b/web/app/components/plugins/plugin-auth/authorize/add-api-key-button.tsx
@@ -24,7 +24,7 @@ const AddApiKeyButton = ({
return (
<>
{renderI18nObject(item.label as Record)}
+ {
+ item.required && (
+ *
+ )
+ }
)
@@ -157,7 +162,7 @@ const AddOAuthButton = ({