Skip to main content

FlowContextValue

type FlowContextValue = OryFlowContainer & {
dispatchFormState: Dispatch<FormStateAction>
formState: FormState
onError?: OryErrorHandler
onSuccess?: OrySuccessHandler
onValidationError?: OryValidationErrorHandler
setFlowContainer: FlowContainerSetter
transientPayload?: OryTransientPayload
}

The return value of the OryFlowContext.

Type declaration

NameTypeDescription
dispatchFormStateDispatch<FormStateAction>Dispatch function to update the form state.
formStateFormStateThe current form state. See FormState
onError?OryErrorHandlerOptional callback invoked when a flow error occurs.
onSuccess?OrySuccessHandlerOptional callback invoked on successful flow completion.
onValidationError?OryValidationErrorHandlerOptional callback invoked when the flow returns validation errors.
setFlowContainerFlowContainerSetterFunction to set the flow container.
transientPayload?OryTransientPayloadOptional transient payload to include in flow submissions.