---
title: authInterrupts
description: "Learn how to enable the experimental `authInterrupts` configuration option to use `forbidden` and `unauthorized`."
url: "https://nextjs.org/docs/15/app/api-reference/config/next-config-js/authInterrupts"
docs_index: /docs/15/llms.txt
lastUpdated: 2025-06-16
badge: "Canary"
prerequisites:
  - "Configuration: /docs/15/app/api-reference/config"
  - "next.config.js: /docs/15/app/api-reference/config/next-config-js"
related:
  - /docs/15/app/api-reference/functions/forbidden
  - /docs/15/app/api-reference/functions/unauthorized
  - /docs/15/app/api-reference/file-conventions/forbidden
  - /docs/15/app/api-reference/file-conventions/unauthorized
---

> For an index of all documentation, see [/docs/15/llms.txt](/docs/15/llms.txt).

The `authInterrupts` configuration option allows you to use [`forbidden`](/docs/app/api-reference/functions/forbidden) and [`unauthorized`](/docs/app/api-reference/functions/unauthorized) APIs in your application. While these functions are experimental, you must enable the `authInterrupts` option in your `next.config.js` file to use them:

```ts title="next.config.ts" 
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  experimental: {
    authInterrupts: true,
  },
}

export default nextConfig
```

```js title="next.config.js" 
module.exports = {
  experimental: {
    authInterrupts: true,
  },
}
```

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/docs/15/llms.txt](/docs/15/llms.txt)