Back to Next Js

authInterrupts

docs/01-app/03-api-reference/05-config/01-next-config-js/authInterrupts.mdx

16.2.5653 B
Original Source

The authInterrupts configuration option allows you to use forbidden and 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
import type { NextConfig } from 'next'

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

export default nextConfig
js
module.exports = {
  experimental: {
    authInterrupts: true,
  },
}