import { StackHandler } from "@stackframe/stack"; import { getAuthProvider } from "@/lib/auth/config"; export default async function Handler(props: unknown) { const authProvider = await getAuthProvider(); if (authProvider === "local") { return (

Local Auth Mode

Stack Auth handler is disabled when using local authentication.

); } // Lazily import the real StackServerApp only when needed const { getStackServerApp } = await import("@/lib/auth/server"); const app = await getStackServerApp(); return ; }