Skip to content
HN On Hacker News ↗

GitHub - biw/keychain-store: Secure storage for signed Electron and Node apps, backed by the modern macOS Data Protection Keychain

▲ 24 points 3 comments by biwills 6d ago HN discussion ↗

Pangram verdict · v3.3

We believe that this text is a mix of AI and human-written content.

83 %

AI likelihood · overall

AI
10% human-written 90% AI-generated
SEGMENTS · HUMAN 1 of 1
SEGMENTS · AI 0 of 1
WORD COUNT 149
PEAK AI % 8% · §1
Analyzed
Aug 18
backend: pangram/v3.3
Segments scanned
1 windows
avg 149 words each
Distribution
10 / 90%
human / AI fraction
Verdict
AI
Pangram v3.3

Article text · 149 words · 1 segments analyzed

Human AI-generated
§1 Human · 8%

Secure storage for signed Electron and Node apps, backed by the modern macOS Data Protection Keychain. Protect items with code-signing access groups; share only with explicitly entitled apps (no security CLI access) Restrict package access to item names your app declares Optionally require device-owner authentication (Touch ID or password), or Touch ID only Store UTF-8 strings and binary values Install pnpm add keychain-store Quick start import { openKeychainStore } from "keychain-store"; const store = openKeychainStore({ // touch ID only authentication: { accessControl: "biometrics-only" }, // build in iCloud sync iCloudSync: true, // support for immutable and mutable accounts accounts: ["installation-id"], mutableAccounts: ["desktop-token", "desktop-refresh-token"], }); // Uint8Array containing 32 random bytes const installationId = await store.getOrCreate("installation-id"); await store.set("desktop-token", "an application token"); // string | null const token = await store.get("desktop-token", "string"); // Uint8Array | null const token = await store.get("desktop-token", "Uint8Array"); accounts declares immutable Keychain items; mutableAccounts declares mutable ones.