serverAuth() is auto‑imported on the server. It:
defineServerAuth function from server/auth.config.ts.const auth = serverAuth()
const session = await auth.api.getSession({ headers: event.headers })
You rarely need to call it directly unless you’re building custom server logic.