{"_id":"@propelauth/byo-node","_rev":"8-325a8274cd976589f31937b1ee17045e","name":"@propelauth/byo-node","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@propelauth/byo-node","version":"1.0.0","keywords":["auth","node","user"],"author":{"name":"PropelAuth"},"license":"MIT","_id":"@propelauth/byo-node@1.0.0","maintainers":[{"name":"andrew-propelauth","email":"andrew@propelauth.com"},{"name":"pfvatterott","email":"pfvatterott@gmail.com"}],"dist":{"shasum":"38a6c2941ac9de14f48526ac67182ffed868ded2","tarball":"https://registry.npmjs.org/@propelauth/byo-node/-/byo-node-1.0.0.tgz","fileCount":9,"integrity":"sha512-sHRMB7SmK87zpsNUPjEJmsFurX7PZOXNq2LPIu85L/N4x0kkZvhPBa7QBHOhCiRL02PC1DtOv7uWFjPT10t4dQ==","signatures":[{"sig":"MEYCIQCzknUuIWjjTdd9pSgoJ4OUmEFd87Mr0MrEQSvHt7tz8QIhAJhLYBapIK11+gCNue1j+Lw5/tawLu/zANDzP1K7Jsmh","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":244949},"jest":{"testMatch":["**/test/*.ts"],"transform":{"^.+\\.(ts|tsx)?$":"ts-jest"},"moduleFileExtensions":["ts","js"]},"main":"dist/index.js","_from":"file:propelauth-byo-node-1.0.0.tgz","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","browser":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"dev":"tsup --watch","test":"jest --silent --passWithNoTests","build":"tsup"},"_npmUser":{"name":"andrew-propelauth","email":"andrew@propelauth.com"},"_resolved":"/private/var/folders/cx/tq_k3_295gl7gw_p34sh5w1w0000gn/T/a487523d1d8077d5da4c2b78ffcef045/propelauth-byo-node-1.0.0.tgz","_integrity":"sha512-sHRMB7SmK87zpsNUPjEJmsFurX7PZOXNq2LPIu85L/N4x0kkZvhPBa7QBHOhCiRL02PC1DtOv7uWFjPT10t4dQ==","_npmVersion":"10.8.2","description":"Node.js client library for PropelAuth BYO (Bring Your Own) authentication","directories":{},"_nodeVersion":"20.19.2","typesVersions":{"*":{".":["./dist/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","tsup":"^8.5.0","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.3"},"_npmOperationalInternal":{"tmp":"tmp/byo-node_1.0.0_1758862256087_0.3900967801379067","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@propelauth/byo-node","version":"1.0.2","keywords":["auth","node","user"],"author":{"name":"PropelAuth"},"license":"MIT","_id":"@propelauth/byo-node@1.0.2","maintainers":[{"name":"andrew-propelauth","email":"andrew@propelauth.com"},{"name":"pfvatterott","email":"pfvatterott@gmail.com"}],"dist":{"shasum":"cde3cfd21ffe68d3e802f0aa9d770e2f2a73db4f","tarball":"https://registry.npmjs.org/@propelauth/byo-node/-/byo-node-1.0.2.tgz","fileCount":9,"integrity":"sha512-j6Q2+YPLC+dcY4rJE4s4YsM1Xem9hDxENfTztisY7fHlnbswh+5BtXNlJMLjTvkt8CVq5b0bj9U3jPs4vxwOFg==","signatures":[{"sig":"MEYCIQDRubXH+9K9qFp9rQc6AdrhIzZDOnRZD7Ak51KPyHVDIAIhAM/bSvzKGPVaWkbbqezYIyAw4OGdFKcV1H6AvfAnSZbO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":245207},"jest":{"testMatch":["**/test/*.ts"],"transform":{"^.+\\.(ts|tsx)?$":"ts-jest"},"moduleFileExtensions":["ts","js"]},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","browser":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"bb31e58e3948ac3197f676139080b733966b71fe","scripts":{"dev":"tsup --watch","test":"jest --silent --passWithNoTests","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"andrew-propelauth","email":"andrew@propelauth.com"},"_npmVersion":"10.8.2","description":"Node.js client library for PropelAuth BYO (Bring Your Own) authentication","directories":{},"_nodeVersion":"20.19.2","typesVersions":{"*":{".":["./dist/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","tsup":"^8.5.0","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.3"},"_npmOperationalInternal":{"tmp":"tmp/byo-node_1.0.2_1760633041920_0.990403975642786","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@propelauth/byo-node","version":"1.0.4","keywords":["auth","node","user"],"author":{"name":"PropelAuth"},"license":"MIT","_id":"@propelauth/byo-node@1.0.4","maintainers":[{"name":"andrew-propelauth","email":"andrew@propelauth.com"},{"name":"pfvatterott","email":"pfvatterott@gmail.com"}],"dist":{"shasum":"9360b091f4f30edefe7fee822e8d243e389c18d6","tarball":"https://registry.npmjs.org/@propelauth/byo-node/-/byo-node-1.0.4.tgz","fileCount":9,"integrity":"sha512-+XHXAvlHcMIevkANL7YmRdalRLTgtBZFJxbLrBVDxdBGTZR35ztp3Q70UcXBwXMKulTb+ul040eGDYVk7ddUVQ==","signatures":[{"sig":"MEUCIQC9Y12OihhyrIuX/Alq5r8mgIKfowBosp/swQOBLoNT4QIgGkKjBdgn9OZKEtMeNuOHVeORN9Zv7bIIjyjfewFe+Ak=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":244473},"jest":{"testMatch":["**/test/*.ts"],"transform":{"^.+\\.(ts|tsx)?$":"ts-jest"},"moduleFileExtensions":["ts","js"]},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","browser":"./dist/index.mjs","default":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"fcc6142f7ff68fea3d1d2854a02a7b1287312c74","scripts":{"dev":"tsup --watch","test":"jest --silent --passWithNoTests","build":"tsup","prepublishOnly":"npm run build"},"_npmUser":{"name":"andrew-propelauth","email":"andrew@propelauth.com"},"_npmVersion":"10.8.2","description":"Node.js client library for PropelAuth BYO (Bring Your Own) authentication","directories":{},"_nodeVersion":"20.19.2","typesVersions":{"*":{".":["./dist/index.d.ts"]}},"_hasShrinkwrap":false,"devDependencies":{"jest":"^30.0.0","tsup":"^8.5.0","ts-jest":"^29.4.0","typescript":"^5.8.3","@types/jest":"^30.0.0","@types/node":"^24.0.3"},"_npmOperationalInternal":{"tmp":"tmp/byo-node_1.0.4_1761244942234_0.3657835329217116","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2025-09-23T06:18:27.547Z","modified":"2026-04-20T19:28:53.351Z","0.1.0":"2025-09-23T06:18:27.738Z","1.0.0":"2025-09-26T04:50:56.309Z","1.0.2":"2025-10-16T16:44:02.094Z","1.0.4":"2025-10-23T18:42:22.462Z"},"author":{"name":"PropelAuth"},"license":"MIT","keywords":["auth","node","user"],"description":"Node.js client library for PropelAuth BYO (Bring Your Own) authentication","maintainers":[{"email":"andrew@propelauth.com","name":"andrew-propelauth"}],"readme":"# @propelauth/byo-node\n\nNode.js client library for PropelAuth BYO (Bring Your Own) authentication - a self-hosted sidecar, written in Rust, that lets you add only the auth pieces you need, **without replacing what already works**.\n\n## Installation\n\n```bash\nnpm install @propelauth/byo-node\n```\n\n## Quick Start\n\n```javascript\nimport { createClient } from \"@propelauth/byo-node\";\n\n// Initialize the client\nconst client = createClient({\n    url: \"http://localhost:2884\", // Your BYO sidecar URL\n    integrationKey: \"YOUR_INTEGRATION_KEY\",\n});\n\n// Test the connection\nconst pingResult = await client.ping({});\n\nif (pingResult.ok) {\n    console.log(\"Connected! Timestamp:\", pingResult.data.timestamp);\n} else {\n    console.error(\"Error\", pingResult.error);\n}\n```\n\n## Features\n\nEach feature is modular and can be used independently:\n\n- **Session Management** - Create, validate, and manage user sessions with security features like IP checks, new device notifications, and session theft protection.\n- **Impersonation** - User impersonation for support\n- **Passkeys** - Add Passkeys for authentication or MFA\n- **SSO** - Enterprise SSO with OpenID Connect (OIDC)\n- **SCIM** - User provisioning and deprovisioning\n- **Device Management** - Track and manage user devices\n\n## Error Handling\n\nAll methods return a `Result` type with explicit, typed errors:\n\n```javascript\nconst result = await client.session.validate({\n    sessionToken: token,\n    ipAddress: req.ip,\n});\n\nif (result.ok) {\n    console.log(\"User ID:\", result.data.userId);\n} else if (result.error.type === \"InvalidSessionToken\") {\n    // Invalid or expired token\n} else if (result.error.type === \"DeviceVerificationFailed\") {\n    // User registered a device, but made a request from an unrecognized device\n}\n// ...\n```\n\n## Documentation\n\nFor complete guides and API reference:\n\n📚 **[docs.byo.propelauth.com](https://docs.byo.propelauth.com)**\n","readmeFilename":"README.md"}