跳到主要内容

authInterrupts

authInterrupts 配置选项允许你在应用中使用 forbiddenunauthorized API。虽然这些功能是实验性的,但你必须在 next.config.js 文件中启用 authInterrupts 选项才能使用它们:

¥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:

import type { NextConfig } from 'next'

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

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