Sponsor
ChatHubChatHub Use GPT-4, Gemini, Claude 3.5 and more chatbots side-by-side
ここをクリック
Menu

authInterrupts

authInterrupts設定オプションを使用すると、アプリケーションでforbiddenおよびunauthorized APIを使用できるようになります。これらの関数は実験的なものであるため、使用するにはnext.config.jsファイルでauthInterruptsオプションを有効にする必要があります:

next.config.ts
TypeScript
import type { NextConfig } from 'next'
 
const nextConfig: NextConfig = {
  experimental: {
    authInterrupts: true,
  },
}
 
export default nextConfig