Auth

Ready to use authentication forms.

Props

Auth Props

PropTypeDefaultDescription
backLinkstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Back to log inBack to log in link
childrenstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>The child component
contextobject
criteriaModeCriteriaMode
defaultViewViewTypeloginThe default view to show.
delayErrornumber
disabledboolean
dividerLabelstringor continue withLabel for the divider between oath and the form
errorsFieldErrors<any>
fieldResolverFieldResolverThe field resolver, used to resolve the fields from schemas.
fieldsDefaultFieldOverridesField overrides
footerstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Render custom elements under the submit button
forgotLinkstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Forgot password?The forgot password link
formReftype ONLY_FOR_FORMAT = | (( instance: UseFormReturn<any, object> | null, ) => void | (() => VoidOrUndefinedOnly)) | RefObject<UseFormReturn<any, object>>The Hook Form state ref.
loginLinkstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Log inCustomize the login link under the sign up form.
mode"onBlur" | "onChange" | "onSubmit" | "all" | "onTouched"
onChangeWatchObserver<any>Triggers when any of the field change.
onError(view: ViewType, error: Error) => voidCalled when a login or signup request fails.
onSuccess(view: ViewType, data: any) => voidCalled when a login or signup request succeeds.
onViewChange(view: ViewType) => voidCalled when the view changes.
progressiveboolean
providerLabelstringContinue withLabel for the provider buttons
providersAvailableProvidersThe OAuth providers that are supported.
redirectUrlstring | ((view: RedirectViews) => string | undefined)The redirect URL after succesful login This will only redirect if implemented in the auth provider.
resetOptionsPartial<{ keepDirtyValues: boolean keepErrors: boolean keepDirty: boolean keepValues: boolean keepDefaultValues: boolean keepIsSubmitted: boolean keepIsSubmitSuccessful: boolean keepTouched: boolean keepIsValidating: boolean keepIsValid: boolean keepSubmitCount: boolean }>
resolverResolver<any, object>
reValidateMode"onBlur" | "onChange" | "onSubmit"
schemaanyThe form schema.
shouldFocusErrorboolean
shouldUnregisterboolean
shouldUseNativeValidationboolean
signupLinkstring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>Sign upCustomize the signup link under the log in form.
titlestring | number | bigint | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...>The form title
translationsPartial<{ signup: string signupSubmit: string; signupSuccess: string; signupSuccessDescription: string; login: string; loginSubmit: string; magicLinkSuccess: string; magicLinkSuccessDescription: string; ... 21 more ...; confirmPassword: string; }>Internationalization options for the auth form.
typeAuthTypeEnumThe authentication type, magiclink or password
valuesany
viewViewTypeSets the visible authentication form. Supported views are: - login - signup - forgot_password - update_password - otp

Was this helpful?