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 and requireRecentLogin remain reactive if they can change at runtime.
Signature
useSignInFlow(options)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| options | SignInFlowOptions | yes |
Returns
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:43