relyingparty.app

Authenticate with Comms.ID, ready to copy

Each template below is a small app that already authenticates people with Comms.ID. Open it, authenticate, then copy it and make it yours. Each one runs live here, on its own host, with its own registration.

Read the Authenticate with Comms.ID docs

Templates

Make it yours

  1. Install the new app in its folder: cd my-app && pnpm install.
  2. In wrangler.jsonc, set the Worker name and COMMS_ID_REDIRECT_URI to https://<your host>/.
  3. Deploy it once: pnpm run deploy. The page and the sector document are live; the session route answers that it is not set up yet.
  4. Make the signing key: npx @comms-id/cli key --worker <your Worker>. It puts the private key in the Worker secret COMMS_ID_PRIVATE_JWK and prints the public key.
  5. Register the app in Companion: the public key, the redirect URI, the sector document https://<your host>/oidc/redirect_uris and the authentication class.
  6. Set COMMS_ID_CLIENT_ID to the client id Companion gives you, and deploy again.

Each template's README.md has the details. Nothing of Comms.ID's is installed: one script tag shows the button, and one request signed by the app's key asks who is authenticated. The app keeps the key on its server; the browser holds only a session-only cookie with the held id.

What these templates keep

Nothing. Comms.ID holds the session; each template keeps only the held id, in a cookie that ends with your browser session, and asks Comms.ID who it is for (your pairwise id for that template, and your Team Membership when you authenticate for a Team) when you act on the page. The session ends about 5 minutes after your last action on the page, and 4 hours after you authenticate at the latest. No token is kept, and no name is asked for.

The templates are our own test bed: they authenticate against production Comms.ID, and nothing depends on them. Each template is its own app, so each one sees a different id for you.