---
title: "AuthFailure"
source: "https://github.com/remix-run/remix/blob/8905f3943706e1f53696ab83e70a84873cabfc90/packages/auth-middleware/src/lib/auth.ts#L6"
---

# AuthFailure

## Summary

Failure details for an unauthenticated request.

## Signature

```ts
interface AuthFailure {
  challenge?: string
  code: 'missing_credentials' | 'invalid_credentials'
  message: string
  method?: string
}

```

## Properties

### `challenge`

Optional challenge value for `WWW-Authenticate`.

### `code`

Failure category used by built-in auth middleware and schemes.

### `message`

Human-readable explanation of the auth failure.

### `method`

Auth method that reported the failure.