Skip to content

πŸ™Œ OpenHands: AI-Driven Development

chore: remove unused cloud auth API (#562)

Hiep Le376b3100fc83
diff --git a/src/api/cloud/auth-service.api.ts b/src/api/cloud/auth-service.api.ts
deleted file mode 100644
index 58f3b40c7b..0000000000
--- a/src/api/cloud/auth-service.api.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { getActiveBackend } from "../backend-registry/active-store";
-import type { Backend } from "../backend-registry/types";
-import { callCloudProxy } from "./proxy";
-
-/**
- * Cloud authentication probe. Routed through the bundled local
- * agent-server's `/api/cloud-proxy` to avoid cross-origin browser calls.
- *
- * Returns true if the API key is accepted by the cloud backend.
- */
-export async function authenticateCloud(backend?: Backend): Promise<boolean> {
- const target =
- backend ??
- (() => {
- const active = getActiveBackend().backend;
- if (active.kind !== "cloud") {
- throw new Error(
- "authenticateCloud requires a cloud backend. Active backend is local.",
- );
- }
- return active;
- })();
- await callCloudProxy<unknown>({
- backend: target,
- method: "POST",
- path: "/api/authenticate",
- });
- return true;
-}