refactor: remove the deprecated auth options

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-20 01:38:08 +05:30
co-authored by Claude Opus 5
parent 97d60d0ba8
commit 7f5e1bc3cf
8 changed files with 5 additions and 73 deletions
-23
View File
@@ -3,7 +3,6 @@ import { createPluginRunner } from "@wrnexus/plugin";
import { authPlugin } from "../src/plugin.ts";
import { AUTH_ROUTE_DEFINITIONS } from "../src/routes/definitions.ts";
import { readFileSync } from "node:fs";
import { getDefaultAuthRouteOptions } from "../src/runtime.ts";
test("plugin contributes components, runtime, styles, migration, and toolbar", async () => {
const metadata = new Map<string, unknown>();
@@ -70,28 +69,6 @@ test("config.auth controls route groups and migrations without explicit plugin o
expect(contributions.routes.some((route) => route.path === "/api/auth/login")).toBe(true);
});
test("config.auth resolves navigation hooks from the configured engine", async () => {
const onSignedIn = () => new Response(null, { status: 204 });
const onSignedOut = () => new Response(null, { status: 204 });
const runner = createPluginRunner(authPlugin(), {
root: process.cwd(),
mode: "development",
command: "dev",
metadata: new Map(),
warn() {},
});
await runner.configure({
auth: {
engine: { onSignedIn, onSignedOut } as never,
routes: true,
},
});
expect(getDefaultAuthRouteOptions().onSignedIn).toBe(onSignedIn);
expect(getDefaultAuthRouteOptions().onSignedOut).toBe(onSignedOut);
});
test("auth runtime contains built-in browser schemas", async () => {
const metadata = new Map<string, unknown>();
const runner = createPluginRunner(authPlugin({ includeMigrations: false }), {