Client config

Shared configuration surface for create*SecureLink helpers.

Conceptual shape (platform helpers wrap this):

createSecureLink({
  baseUrl: "https://api.example.com",
  authMode: "anonymous" | "customAuth",
 
  attestation: {
    enabled: true,
    provider: myAttestationProvider,
  },
 
  storage: "memory" | StorageAdapter,
  // web: persistent?: boolean → SecureWebStorage; credentialDelivery?: "bearer" | "cookie"
  // rn: secureStorage?: Keychain / SecureStore (required in production)
  // extension: browser.storage / chrome.storage (not page localStorage)
  // credentialDelivery?: "bearer" | "cookie" — cookie = HttpOnly from server
 
  authorization: {
    getAuthorization: async () => AuthorizationMetadata | null,
    onUnauthorized?: async () => void,
  }, // required for customAuth
 
  storagePrefix: "securelink",
  transport: customTransport, // optional
});

Platform entrypoints

  • createWebSecureLink(...)
  • createReactNativeSecureLink(...)
  • createExtensionSecureLink(...) (async)

Client methods

await client.initialize();
const res = await client.request({ method, path, body, headers });
const session = await client.session.get();