{"id":18550950,"url":"https://github.com/mikescops/node-native-keychain","last_synced_at":"2026-05-05T17:31:41.902Z","repository":{"id":231287210,"uuid":"781374017","full_name":"Mikescops/node-native-keychain","owner":"Mikescops","description":"🔐 Node.js native macos keychain module written in Swift","archived":false,"fork":false,"pushed_at":"2025-07-11T14:37:58.000Z","size":232,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-09T11:44:07.670Z","etag":null,"topics":["keychain","koffi","macos","napi","node","nodejs"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/native-keychain","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mikescops.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["mikescops"]}},"created_at":"2024-04-03T09:02:30.000Z","updated_at":"2025-07-11T14:37:32.000Z","dependencies_parsed_at":"2025-05-15T10:10:55.821Z","dependency_job_id":"f67111b6-1cc6-464a-a5da-8628bd86d818","html_url":"https://github.com/Mikescops/node-native-keychain","commit_stats":null,"previous_names":["mikescops/node-native-keychain"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Mikescops/node-native-keychain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fnode-native-keychain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fnode-native-keychain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fnode-native-keychain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fnode-native-keychain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mikescops","download_url":"https://codeload.github.com/Mikescops/node-native-keychain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mikescops%2Fnode-native-keychain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32660182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keychain","koffi","macos","napi","node","nodejs"],"created_at":"2024-11-06T21:06:20.773Z","updated_at":"2026-05-05T17:31:41.892Z","avatar_url":"https://github.com/Mikescops.png","language":"TypeScript","funding_links":["https://github.com/sponsors/mikescops"],"categories":[],"sub_categories":[],"readme":"# Node Native Keychain\n\n![GitHub package.json version](https://img.shields.io/github/package-json/v/mikescops/node-native-keychain)\n![npm](https://img.shields.io/npm/v/native-keychain)\n![npm](https://img.shields.io/npm/dw/native-keychain)\n![GitHub](https://img.shields.io/github/license/mikescops/node-native-keychain)\n![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mikescops/node-native-keychain/pr-validation.yml)\n\nThis is a TypeScript library to store and retrieve secure information from the macos keychain. It is a wrapper around the native keychain APIs on macOS built in Swift and bindings with Koffi.\n\n## Installation\n\n```bash\nnpm install native-keychain\n```\n\n## Usage\n\n\u003e **Note:** For the moment, we only store [Generic passwords](https://developer.apple.com/documentation/security/ksecclassgenericpassword) in the keychain.\n\n```typescript\nimport * as keychain from 'native-keychain';\n\nkeychain.setPassword({\n    service: 'my-service',\n    account: 'my-account',\n    password: 'my-password'\n});\n\nconst secret = await keychain.getPassword({\n    service: 'my-service',\n    account: 'my-account',\n    requireBiometrics: true\n}); // 'my-password'\n```\n\n## Available methods\n\n| Method                          | Description                            | Output             |\n| ------------------------------- | -------------------------------------- | ------------------ |\n| `getPassword`                   | Retrieve a password from the keychain. | `Promise\u003cstring\u003e`  |\n| `setPassword`                   | Store a password in the keychain.      | `void`             |\n| `deletePassword`                | Delete a password from the keychain.   | `void`             |\n| `isBiometricsSupported`         | Check if biometrics is supported.      | `boolean`          |\n| `requestBiometricsVerification` | Request biometrics verification.       | `Promise\u003cboolean\u003e` |\n\n## Development\n\n### Running Tests\n\n```bash\nnpm run test\n```\n\n**Note:** The tests require user interaction for biometric authentication. When prompted, please authenticate using Touch ID, Face ID, or your system password to complete the biometric verification tests.\n\nThe test suite includes:\n\n- Biometric support verification\n- Password storage and retrieval with accounts\n- Biometric-protected password operations\n- Cleanup and error handling\n\n### Building\n\n```bash\nnpm run build\n```\n\n### Linting\n\n```bash\nnpm run lint\n```\n\n## Maintainer\n\n| [![twitter/mikescops](https://avatars0.githubusercontent.com/u/4266283?s=100\u0026v=4)](https://pixelswap.fr 'Personal Website') |\n| --------------------------------------------------------------------------------------------------------------------------- |\n| [Corentin Mors](https://pixelswap.fr/)                                                                                      |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikescops%2Fnode-native-keychain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikescops%2Fnode-native-keychain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikescops%2Fnode-native-keychain/lists"}