---
url: "https://vueda.dev/v3/reference/api/js/use/useSignInFlow/functions/useSignInFlow.md"
title: "useSignInFlow"
---

# 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

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| <span id="param-options">options</span> | [SignInFlowOptions](/v3/reference/api/js/use/useSignInFlow/types/SignInFlowOptions.md) | yes |  |

### Returns

[SignInFlowContext](/v3/reference/api/js/use/useSignInFlow/types/SignInFlowContext.md)

## 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`
