{"_id":"@benote/sso-frontend","_rev":"4-a01cd7f745483be5e4abded2650d5653","name":"@benote/sso-frontend","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@benote/sso-frontend","version":"1.0.0","_id":"@benote/sso-frontend@1.0.0","maintainers":[{"name":"latitibabu","email":"latitibabu2018@gmail.com"}],"dist":{"shasum":"40110d0d3d101dde95539748a060469a62d5c54a","tarball":"https://registry.npmjs.org/@benote/sso-frontend/-/sso-frontend-1.0.0.tgz","fileCount":3,"integrity":"sha512-3lZ1co+vaU0NbOEJ6oVH1LzgIedjjarGm8QhJwi8ZqE4POB8xvy+SJSYRtV8BX5yYjP3M7d43p0uZhpBj78tGQ==","signatures":[{"sig":"MEQCIFjTKISCide3AN5N/mIMA9+wScOVnd2hWekbP/N5+QT+AiB1rbMnx4GyILepFlD7CsbbGrExw889wFjw9S1mPa0LRA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1997},"main":"index.js","_npmUser":{"name":"latitibabu","email":"latitibabu2018@gmail.com"},"_npmVersion":"11.6.1","description":"Frontend SSO logic for Benote ecosystem","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^17.0.0 || ^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-frontend_1.0.0_1769687470276_0.7085789481708893","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@benote/sso-frontend","version":"1.1.0","_id":"@benote/sso-frontend@1.1.0","maintainers":[{"name":"latitibabu","email":"latitibabu2018@gmail.com"}],"dist":{"shasum":"7dd530fac6e73feb84a4ee9a04bcaf64c43d7786","tarball":"https://registry.npmjs.org/@benote/sso-frontend/-/sso-frontend-1.1.0.tgz","fileCount":4,"integrity":"sha512-2WHF+WdI3CncYQz7+7pGpasXOuvXHfXHeA7XXp/gbYDrWFzvAT0RFkr1O+c86a8jFml+Sa31Ny5J8v9iPOmKcQ==","signatures":[{"sig":"MEQCIB6AJn36OaVRy2rdOT63C4mgLQbOXjEbeRmTrTLE++BFAiA9qXJwyiC0Er/S+kHX1sVc4JB+AjcW4lcB4gYz040iOA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3481},"main":"index.js","gitHead":"5cfdbcf01659d854cedbc63a4d3c81ab4aab1dda","_npmUser":{"name":"latitibabu","email":"latitibabu2018@gmail.com"},"_npmVersion":"11.6.1","description":"Frontend SSO logic for Benote ecosystem","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^17.0.0 || ^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-frontend_1.1.0_1769687818049_0.9890141795173593","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@benote/sso-frontend","version":"1.2.0","_id":"@benote/sso-frontend@1.2.0","maintainers":[{"name":"latitibabu","email":"latitibabu2018@gmail.com"}],"dist":{"shasum":"dfaabf7644dfe4c77c9888120fe0fe6131a2bae6","tarball":"https://registry.npmjs.org/@benote/sso-frontend/-/sso-frontend-1.2.0.tgz","fileCount":4,"integrity":"sha512-aQvi302FX7eDAiZrjVocj9UCuCa/z/CW1hxlVxyVIOwbfPWkq0UD/A6tXDRpBc++Ty5ixJjqx2LC10CF+5O0PA==","signatures":[{"sig":"MEUCIQCoc8AkhHaKIk1Hw5+InZ8XJu5B7touaxFKV9Baip7OtwIgPzKVoaIz6kXm0YgYxM1GCSEt7JX+aIzkziCzubFuQ2U=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3672},"main":"index.js","gitHead":"a9b338e1de23c0bccb076ad840961d660a309280","_npmUser":{"name":"latitibabu","email":"latitibabu2018@gmail.com"},"_npmVersion":"11.6.1","description":"Frontend SSO logic for Benote ecosystem","directories":{},"_nodeVersion":"24.11.0","_hasShrinkwrap":false,"peerDependencies":{"react":"^17.0.0 || ^18.0.0"},"_npmOperationalInternal":{"tmp":"tmp/sso-frontend_1.2.0_1769692514894_0.723507018227765","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@benote/sso-frontend","version":"1.3.0","description":"Framework-agnostic frontend SSO utilities for Benote ecosystem","main":"index.cjs","module":"index.mjs","exports":{".":{"require":"./index.cjs","import":"./index.mjs"}},"scripts":{"test":"node --test tests/**/*.test.cjs"},"gitHead":"2b48d9c360c0c805e3da867c94928558366d4f3f","_id":"@benote/sso-frontend@1.3.0","_nodeVersion":"24.11.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-2lSaYMn/QcrqofuGZuM4Ji46nVwT09q0Mf8/bOO7a4OeYwkWtyMcV8f+py8yCRsLKHncmroZO162SoPWMI/AxA==","shasum":"de6733cbe147ac4cf13d2e64578e99bd7a692ed7","tarball":"https://registry.npmjs.org/@benote/sso-frontend/-/sso-frontend-1.3.0.tgz","fileCount":8,"unpackedSize":8578,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCpt/No/BNCfeQi8y6QLsahpZaoa7NyyOwMPvjuuMs3ywIhANZ0RCZsKfRLJJd6MUk5PwvrQZtqwUt2gnmt+DhTlHsz"}]},"_npmUser":{"name":"latitibabu","email":"latitibabu2018@gmail.com"},"directories":{},"maintainers":[{"name":"latitibabu","email":"latitibabu2018@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sso-frontend_1.3.0_1772197664577_0.42085937917152294"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-29T11:51:10.138Z","modified":"2026-02-27T13:07:44.897Z","1.0.0":"2026-01-29T11:51:10.418Z","1.1.0":"2026-01-29T11:56:58.189Z","1.2.0":"2026-01-29T13:15:15.059Z","1.3.0":"2026-02-27T13:07:44.756Z"},"description":"Framework-agnostic frontend SSO utilities for Benote ecosystem","maintainers":[{"name":"latitibabu","email":"latitibabu2018@gmail.com"}],"readme":"# @benote/sso-frontend\r\n\r\nFramework-agnostic frontend utilities for SSO handoff.\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @benote/sso-frontend\r\n```\r\n\r\n## Tests\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\nTest files live in `frontend/tests`.\r\n\r\n## Works In\r\n\r\n- Plain browser JavaScript\r\n- React, Vue, Angular, Svelte\r\n- Bundlers and runtimes using either ESM (`import`) or CommonJS (`require`)\r\n\r\n## API\r\n\r\n### `triggerSSO(apiEndpoint, targetBaseUrl, authToken, options?)`\r\n\r\nFetches an SSO token from your backend and submits it to `${targetBaseUrl}/auth/sso/callback` via hidden form POST.\r\n\r\n### `createSSOClient(defaults?)`\r\n\r\nCreates a reusable client with defaults (`apiEndpoint`, `targetBaseUrl`, `authToken`, `options`).\r\n\r\n### `useSSO()`\r\n\r\nCompatibility helper that returns `{ triggerSSO }`. This is not React-specific and can be used anywhere.\r\n\r\n## ESM Usage\r\n\r\n```javascript\r\nimport { triggerSSO, createSSOClient } from \"@benote/sso-frontend\";\r\n\r\nawait triggerSSO(apiEndpoint, targetBaseUrl, authToken, {\r\n  allowedTargetOrigins: [new URL(targetBaseUrl).origin],\r\n});\r\n\r\nconst sso = createSSOClient({\r\n  apiEndpoint,\r\n  targetBaseUrl,\r\n  options: { timeoutMs: 10000 },\r\n});\r\nawait sso.triggerSSO(undefined, undefined, authToken);\r\n```\r\n\r\n## CommonJS Usage\r\n\r\n```javascript\r\nconst { triggerSSO } = require(\"@benote/sso-frontend\");\r\n\r\nawait triggerSSO(apiEndpoint, targetBaseUrl, authToken);\r\n```\r\n","readmeFilename":"README.md"}