Auth

Ready to use authentication forms.

Props#

Auth Props#

PropTypeDefaultDescription
backLinktype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeBack to log inBack to log in link
childrentype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeThe child component
contextobject
criteriaModeCriteriaMode
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
footertype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeRender custom elements under the submit button
forgotLinktype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeForgot password?The forgot password link
formRefRefObject<UseFormReturn<any, object>>The Hook Form state ref.
loginLinktype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeLog 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 keepIsValid: boolean keepSubmitCount: boolean }>
resolverResolver<any, object>
reValidateMode"onBlur" | "onChange" | "onSubmit"
schemaanyThe form schema.
shouldFocusErrorboolean
shouldUnregisterboolean
shouldUseNativeValidationboolean
signupLinktype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeSign upCustomize the signup link under the log in form.
titletype ONLY_FOR_FORMAT = | string | number | boolean | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | PromiseLikeOfReactNodeThe form title
translationsPartial<{ signup: string signupSubmit: string; signupSuccess: string; signupSuccessDescription: string; login: string; loginSubmit: string; magicLinkSuccess: string; magicLinkSuccessDescription: string; ... 19 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?