feat: enable auth openapi and password checks

This commit is contained in:
2026-06-10 02:29:46 -07:00
parent 9e0f751489
commit 987c208f88
4 changed files with 37 additions and 2 deletions

View File

@@ -18,9 +18,10 @@ describe("cfw-auth worker", () => {
expect(response.status).toBe(404);
});
it("routes Better Auth traffic through /api/auth/*", async () => {
it("exposes Better Auth OpenAPI reference", async () => {
const response = await worker.fetch(new Request("http://auth.local/api/auth/reference"), env);
expect([200, 404, 500]).toContain(response.status);
expect(response.status).toBe(200);
expect(response.headers.get("content-type") ?? "").toContain("text/html");
});
it("applies configured CORS origin for auth routes", async () => {