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

# use/useAuthFlow

## Overview

Sets up reauthentication routing, UnauthorizedError interception, and a
form context for forms that gate access behind prior authentication.

## Methods

- [useAuthFlow](/v3/reference/api/js/use/useAuthFlow/functions/useAuthFlow.md) - Registers reauthentication routing behaviour, produces a submission error handler, and provides a form context.

## Types

### [AuthFlowContext](/v3/reference/api/js/use/useAuthFlow/types/AuthFlowContext.md)

### [AuthFlowOptions](/v3/reference/api/js/use/useAuthFlow/types/AuthFlowOptions.md)

## Source

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