---
url: "https://vueda.dev/v3/reference/api/js/use/useAuthFlow/types/AuthFlowContext.md"
title: "AuthFlowContext"
---

# AuthFlowContext

## Properties

### formContext {#formContext}

The form context.

Type: [FormContext](/v3/reference/api/js/use/useForm/types/FormContext.md)

Source: `client/lib/use/useAuthFlow.js:30`

### onSubmissionErrorHandler {#onSubmissionErrorHandler}

Handles an `UnauthorizedError` from the refetched `storeUser` state. A signed-out user is sent to the sign-in
 route. A pending reauthentication flow sends the user to the reauthenticate route. Every other error, including
 an `UnauthorizedError` whose navigation the router reports as failed, goes to the `onSubmissionErrorHandler`
 option. Without that option, it goes to `defaultOnSubmissionError`. The result is the handled result of
 whichever handler ran.

Type: `(args: object) => Promise`

Source: `client/lib/use/useAuthFlow.js:31`

### redirectTo {#redirectTo}

Pushes to `route.query.returnPath` if
 present, otherwise to the `redirect` option. Resolves `false` when neither is set or the router reports a
 navigation failure, so `useActionForm` keeps the form usable.

Type: `() => Promise`

Source: `client/lib/use/useAuthFlow.js:37`

## Source

`client/lib/use/useAuthFlow.js:29`
