authInterrupts
This feature is currently available in the canary channel and subject to change. Try it out byupgrading Next.js, and share your feedback onGitHub.
Last updated June 16, 2025
TheauthInterrupts configuration option allows you to useforbidden andunauthorized APIs in your application. While these functions are experimental, you must enable theauthInterrupts option in yournext.config.js file to use them:
next.config.ts
importtype { NextConfig }from'next'constnextConfig:NextConfig= { experimental: { authInterrupts:true, },}exportdefault nextConfigWas this helpful?