{"_id":"@hellocoop/emdash","_rev":"2-17bf2c9693473feedc2ce070d2de29d7","name":"@hellocoop/emdash","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0":{"name":"@hellocoop/emdash","version":"0.1.0","keywords":["emdash","cms","auth","hello","hellocoop","oidc","openid","provider-commands"],"author":{"url":"https://hello.coop","name":"Hello Identity Co-op","email":"contact@hello.coop"},"license":"MIT","_id":"@hellocoop/emdash@0.1.0","maintainers":[{"name":"dickhardt","email":"dickhardt@gmail.com"},{"name":"rohanharikr","email":"rohanharikumar80@gmail.com"}],"homepage":"https://www.hello.dev","dist":{"shasum":"daa77b0aba50f6c3991c38c77c26952385ec7533","tarball":"https://registry.npmjs.org/@hellocoop/emdash/-/emdash-0.1.0.tgz","fileCount":16,"integrity":"sha512-xiH7HUz0MAWBi3klhbzpaP30Zcv13BfCzZLPjGo79VM12zzRG5n+EjRHYYQhcX1id4tEYldbUNoL9xKmlvp9kQ==","signatures":[{"sig":"MEQCIB/jpillv9niTuhVnRyN7PZRUuXq8Vdv6KkxyOpTw9m+AiAV4R5jXYCk9e23j0BVm48x9VDuvAtmO84X3Atu6nfxZA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56370},"main":"src/auth.ts","type":"module","exports":{".":"./src/auth.ts","./admin":"./src/admin.tsx","./config":"./src/config.ts","./storage":"./src/storage.ts","./routes/*":"./src/routes/*","./commands/*":"./src/commands/*"},"gitHead":"68a2bbf777e017e7cb661a4ee956f09045d7a5f1","scripts":{"test":"vitest run","typecheck":"tsc --noEmit"},"_npmUser":{"name":"dickhardt","email":"dickhardt@gmail.com"},"_npmVersion":"11.16.0","description":"Hellō authentication provider for EmDash CMS — login with Hellō, plus OpenID Provider Commands for account lifecycle","directories":{},"_nodeVersion":"22.22.3","dependencies":{"jose":"^5.9.6","@hellocoop/definitions":"^1.0.13","@hellocoop/helper-server":"^2.2.5"},"_hasShrinkwrap":false,"devDependencies":{"astro":"^5.0.0","react":"^19.0.0","emdash":"file:../../emdash-cms/emdash/packages/core","kysely":"^0.29.5","vitest":"^3.0.0","typescript":"^5.7.0","@types/react":"^19.0.0","@cloudflare/kumo":"^2.6.0","@emdash-cms/auth":"file:../../emdash-cms/emdash/packages/auth"},"peerDependencies":{"astro":">=5","react":">=18","emdash":">=0.35.0","@emdash-cms/auth":">=0.35.0"},"_npmOperationalInternal":{"tmp":"tmp/emdash_0.1.0_1788728294830_0.4681493021236447","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@hellocoop/emdash","version":"0.1.1","description":"Hellō authentication provider for EmDash CMS — login with Hellō, plus OpenID Provider Commands for account lifecycle","type":"module","main":"./dist/auth.js","exports":{".":{"types":"./dist/auth.d.ts","default":"./dist/auth.js"},"./admin":{"types":"./dist/admin.d.ts","default":"./dist/admin.js"},"./routes/*":{"types":"./dist/routes/*.d.ts","default":"./dist/routes/*.js"},"./commands/*":{"types":"./dist/commands/*.d.ts","default":"./dist/commands/*.js"},"./config":{"types":"./dist/config.d.ts","default":"./dist/config.js"},"./storage":{"types":"./dist/storage.d.ts","default":"./dist/storage.js"}},"keywords":["emdash","cms","auth","hello","hellocoop","oidc","openid","provider-commands"],"author":{"name":"Hello Identity Co-op","email":"contact@hello.coop","url":"https://hello.coop"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/hellocoop/emdash.git"},"bugs":{"url":"https://github.com/hellocoop/emdash/issues"},"homepage":"https://www.hello.dev","engines":{"node":">=22.16"},"peerDependencies":{"@emdash-cms/auth":">=0.35.0","astro":">=5","emdash":">=0.35.0","react":">=18"},"dependencies":{"@hellocoop/definitions":"^1.0.13","@hellocoop/helper-server":"^2.2.5","jose":"^6.2.11"},"devDependencies":{"@cloudflare/kumo":"^2.13.1","@emdash-cms/auth":"^0.36.0","@types/react":"^19.2.18","astro":"^7.3.1","emdash":"^0.36.0","kysely":"^0.29.5","react":"^19.2.8","typescript":"^6.0.3","vitest":"^5.0.0"},"scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json","typecheck":"tsc --noEmit","test":"vitest run","prepublishOnly":"npm run build"},"types":"./dist/auth.d.ts","gitHead":"5226af8f7cfa9f5ae655bb49073b5cd74aa4977d","_id":"@hellocoop/emdash@0.1.1","_nodeVersion":"24.20.0","_npmVersion":"12.0.2","dist":{"integrity":"sha512-pFRS3+9dJ3wVHLj5pwVEX7duhyIqk2R/4R2lErpButMxkDbYmwJ/3cc4MFYKVuFQe1qh+q1VJDyHa9s1DVLdvQ==","shasum":"f30dd61f834524bf0508d1a6eb5ea503d059fd7c","tarball":"https://registry.npmjs.org/@hellocoop/emdash/-/emdash-0.1.1.tgz","fileCount":27,"unpackedSize":71753,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@hellocoop%2femdash@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC1dQ8Jh+m7MOKgs/ueNFbekO4bda7SKMgvhtdScrIsOQIgK5v8AG3p7jh91nn6RpaKA/oKiN9hH+0DzEo5KJuVTSA="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:f36f5c8a-08c8-40ed-880f-8d204148f17d"}},"directories":{},"maintainers":[{"name":"dickhardt","email":"dickhardt@gmail.com"},{"name":"rohanharikr","email":"rohanharikumar80@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/emdash_0.1.1_1788772247658_0.12764992740772452"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-06T20:58:14.685Z","modified":"2026-09-07T09:10:48.200Z","0.1.0":"2026-09-06T20:58:14.959Z","0.1.1":"2026-09-07T09:10:47.785Z"},"author":{"name":"Hello Identity Co-op","email":"contact@hello.coop","url":"https://hello.coop"},"license":"MIT","homepage":"https://www.hello.dev","keywords":["emdash","cms","auth","hello","hellocoop","oidc","openid","provider-commands"],"description":"Hellō authentication provider for EmDash CMS — login with Hellō, plus OpenID Provider Commands for account lifecycle","maintainers":[{"name":"dickhardt","email":"dickhardt@gmail.com"},{"name":"rohanharikr","email":"rohanharikumar80@gmail.com"}],"readme":"# @hellocoop/emdash\n\n[Hellō](https://hello.dev) login for [EmDash](https://github.com/emdash-cms/emdash) — and account lifecycle management via [OpenID Provider Commands](https://openid.net/specs/openid-provider-commands-1_0.html).\n\nOne integration gives your EmDash site login with passkeys, email, Google, Apple, Microsoft, GitHub, and 30+ other providers — your users choose, you write no provider-specific code. Hellō can also deprovision accounts it issued: suspend, delete, and audit commands arrive signed at your site and are applied to the matching EmDash user.\n\n## Install\n\nEmDash's marketplace does not list auth providers yet, so there is no plugin to\ninstall from the admin UI. Adding Hellō is an npm install plus one line of\nconfig.\n\n```bash\nnpm add @hellocoop/emdash\n```\n\nThe package ships compiled JavaScript and type declarations (`dist/`), so it\nneeds no build step of your own. It expects `emdash`, `@emdash-cms/auth`,\n`astro` 5+ and `react` 18+ from your site — the versions an EmDash site\nalready has.\n\n```js\n// astro.config.mjs\nimport { defineConfig } from \"astro/config\";\nimport emdash from \"emdash/astro\";\nimport { hello } from \"@hellocoop/emdash\";\n\nexport default defineConfig({\n\tintegrations: [\n\t\temdash({\n\t\t\tauthProviders: [hello()],\n\t\t}),\n\t],\n});\n```\n\nWith no `clientId` configured, visit `/_emdash/api/auth/hello/quickstart` to register your site with Hellō Quickstart — it stores the `client_id` for you. Or set it explicitly:\n\n```js\nhello({ clientId: \"your-hello-client-id\" });\n```\n\nHellō clients are public — there is no client secret to manage.\n\n## Configuration\n\n```ts\nhello({\n\t// client_id; falls back to EMDASH_OAUTH_HELLO_CLIENT_ID, HELLO_CLIENT_ID,\n\t// then the value stored by Quickstart\n\tclientId: \"…\",\n\n\t// extra scopes beyond openid name email (e.g. \"picture\")\n\tscopes: [\"picture\"],\n\n\t// preferred providers shown first in the wallet\n\tproviderHint: [\"github\", \"email\"],\n\n\t// who may self-provision (beyond the first user, who becomes Admin):\n\tautoProvision: true,\n\tallowedEmails: [\"*.example.com\", \"alice@example.org\"],\n\tdefaultRole: 10, // 10 Subscriber … 50 Admin\n\n\t// OpenID Provider Commands endpoint (default true)\n\tproviderCommands: true,\n});\n```\n\nSign-in policy: the first user on a site becomes Admin (setup). After that, an existing linked user can always sign in, a user with the same verified email is auto-linked, and new users are created only when `autoProvision` is on **and** their email matches `allowedEmails`. No allowlist means no self-signup — invite users instead.\n\n## Routes\n\n| Route | Purpose |\n| --- | --- |\n| `GET /_emdash/api/auth/hello/login` | Start login (authorization code + PKCE). Accepts `?returnTo=/path`. |\n| `GET /_emdash/api/auth/hello/callback` | Redirect back from the Hellō Wallet |\n| `GET /_emdash/api/auth/hello/quickstart` | Register a client with Hellō Quickstart |\n| `POST /_emdash/api/auth/hello/commands` | OpenID Provider Commands endpoint |\n\n## Provider Commands\n\nThe commands endpoint verifies each `command_token` (signed by the issuer, `typ: command+jwt`, audience bound to the endpoint URL, single-use `jti`) and applies it to the EmDash user linked to the Hellō `sub`:\n\n| Command | Effect |\n| --- | --- |\n| `metadata` | Describe this deployment |\n| `activate` | Pre-provision a user |\n| `maintain` | Sync email / name |\n| `suspend` / `reactivate` | Disable / re-enable login |\n| `archive` / `restore` | Soft-remove / restore |\n| `delete` | Delete the user (tombstoned — the sub cannot sign back in) |\n| `audit` | Report account state |\n| `invalidate` | Acknowledge session invalidation |\n\nRegister `https://your-site/_emdash/api/auth/hello/commands` as the command endpoint for your client in the [Hellō console](https://console.hello.coop).\n\n## Testing against non-production issuers\n\n```ts\nhello({\n\twallet: \"https://wallet.hello-beta.net\", // issuer derived automatically\n\tcommandIssuers: [{ issuer: \"http://127.0.0.1:3333\" }], // e.g. mockin\n});\n```\n\n## Cutting a release\n\nPublishing runs in GitHub Actions\n([`.github/workflows/publish.yml`](.github/workflows/publish.yml)) and\nauthenticates with npm trusted publishing (OIDC). There is no `NPM_TOKEN`\nsecret, and nobody publishes from a laptop.\n\nOne-time setup, from a maintainer's machine (needs npm 11.5.1+ and answers a\n2FA challenge):\n\n```bash\nnpm trust github @hellocoop/emdash --repo hellocoop/emdash --file publish.yml --allow-publish\nnpm trust list @hellocoop/emdash\n```\n\n`--file` is the workflow filename alone, and it must match the workflow that\n*starts* the run. `--allow-publish` matters: configurations created after\n3 September 2026 permit only `npm stage publish` by default, and this workflow\ndoes a direct `npm publish`. The same thing can be set on npmjs.com under the\npackage's **Settings → Trusted Publisher**.\n\n**Provenance requires this repository to be public** — npm rejects a publish\nwith `--provenance` from a private source repository (HTTP 422, \"Only public\nsource repositories are supported when publishing with provenance\"). It also\nrequires the `repository` field in `package.json` to match where the publish\ncomes from. Once every version carries an attestation, \"Require provenance\"\ncan be turned on for the package on npmjs.com.\n\nTo cut a release:\n\n1. Bump `version` in `package.json` on a branch, and merge it to `main`.\n2. Create a GitHub release tagged `vX.Y.Z` — for example\n   `gh release create v0.1.1 --generate-notes`.\n3. The workflow builds, tests, checks that the tag matches `package.json`, and\n   publishes. `prepublishOnly` rebuilds `dist/` regardless, so a publish can\n   never ship a stale build.\n\n`v0.1.0` was published by hand before this pipeline existed; that tag marks the\nexact tree on npm.\n\n## License\n\nMIT\n","readmeFilename":"README.md","repository":{"type":"git","url":"git+https://github.com/hellocoop/emdash.git"},"bugs":{"url":"https://github.com/hellocoop/emdash/issues"}}