Skip to content

useSignInFlow ​

Overview ​

Registers sign-in routing behaviour and provides a form context. Pass options as a reactive object (e.g. the component's props) so that redirect, requireRecentLogin, and toasts remain reactive if they can change at runtime.

Signature ​

useSignInFlow(options)

Parameters ​

NameTypeRequiredDescription
optionsSignInFlowOptionsyes

Returns ​

SignInFlowContext

Examples ​

js
// In a component that owns its own layout:
const formProps = reactive({ initialValues: { email: "", password: "" } });
const { formContext } = useSignInFlow({ redirect: "/dashboard", formProps });

Source ​

client/lib/use/useSignInFlow.js:115