Extension

Browser extension client with installation proof (Chrome, Firefox, Edge).

pnpm add @securelink/extension

Production defaults

  • Storage: browser.storage / chrome.storage (session preferred) — not page localStorage
  • Installation keypair: Ed25519; public key only registered with the server
  • Per-request proof binding (safe under concurrent calls)
  • Manifest needs the storage permission

Anonymous

import { createExtensionSecureLink } from "@securelink/extension";
 
const client = await createExtensionSecureLink({
  baseUrl: "https://api.example.com",
  authMode: "anonymous",
  installationProofEnabled: true,
});
 
await client.initialize();

Custom auth

const client = await createExtensionSecureLink({
  baseUrl: "https://api.example.com",
  authMode: "customAuth",
  installationProofEnabled: true,
  authorization: {
    async getAuthorization() {
      return { authorization: `Bearer ${token}`, scheme: "custom" };
    },
  },
});