diff --git a/src/auth.ts b/src/auth.ts index e854081..6dc1030 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -1,11 +1,11 @@ import path from "node:path"; import os from "node:os"; import fs from "node:fs"; +import { randomBytes } from "node:crypto"; const CREDENTIALS_DIR = path.join(os.homedir(), ".supermemory-cursor"); const CREDENTIALS_FILE = path.join(CREDENTIALS_DIR, "credentials.json"); -const AUTH_PORT = 19878; -const AUTH_URL = "https://console.supermemory.ai/auth/connect"; +const AUTH_URL = process.env.SUPERMEMORY_AUTH_URL || "https://app.supermemory.ai/auth/connect"; const SUCCESS_HTML = `