import { StackHandler, StackTheme } from "@stackframe/stack"; import { getAuthProvider } from "@/lib/auth/config"; import { AuthEnterpriseCTA } from "./AuthEnterpriseCTA"; import { AuthShell } from "./AuthShell"; import { BackButton } from "./BackButton"; import { stackAuthDarkTheme } from "./stack-theme"; 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 ( }> ); }