pkg:clod/com.clodhub/guest-identity 0.12.0 Names without accounts, private tokens that rotate, and returning to a name with its token. `guest-identity` lets people take part with only a typed name. A name belongs to one identity record. Claiming a free name returns a private bearer token. A name in use is given back only to a claim that presents its current token (a guest returning after a reload or reconnect), which gets a new token and cancels the old one; typing the name without the token is refused (`nameTaken`). Tokens can rotate after a set time. The component also keeps, on each device, the typed name and the token and room of each slot (a player's seat, a table viewer) so the application can reconnect after a restart. Examples Ann joins on a phone and closes the app; the app reopens and reconnects with the saved token. Bob types Ann's name on a laptop: the claim is refused (`nameTaken`) and Ann keeps her seat. With rotation set to 60 seconds, a phone that was asleep during a rotation presents the old token within a minute and is handed the new one. Typing a name with a leading space or an accented letter is refused. Package URL: pkg:clod/com.clodhub/guest-identity@0.12.0 Class: Guest identity (pkg:clod/com.clodhub/guest-identity-class@1.1.0): Sign-in by name with a device token, no account. Any component of this class can fill a recipe slot that asks for it. Category people-and-accounts/sign-in; https://clodhub.com/classes/guest-identity-class.txt; 0 other components of this class: https://clodhub.com/components.txt?class=pkg%3Aclod%2Fcom.clodhub%2Fguest-identity-class Provides (1) - guest-identity (com.clodhub/guest-identity 1.0.0): Guests known by the name they type, with private bearer tokens that rotate. Pure functions over a plain book (server/identity.ts, storage belongs to the caller), the same functions with the settings bound once (createIdentityApi, what seating and realtime-rooms call), and a device-side store of the name and per-slot tokens (web/identity-store.ts, Swift and Kotlin IdentityStore with NameRules). Methods are tagged with the languages that provide them. Over the wire a client sends {name}, the server answers {token, playerId}, later requests carry Authorization: Bearer , and a response may carry a rotated token. components that use it: https://clodhub.com/components.txt?requires=com.clodhub%2Fguest-identity Requires (0) - none Settings (3) Three settings. `nameMinLength` (default 1) and `nameMaxLength` (default 20) bound a name, which must be printable ASCII with no space at either end. `tokenRotationSeconds` (default 0) is how long a token lives before the next authenticated request swaps it; 0 turns rotation off so a token lasts until the name is claimed again. The replaced token keeps working for one further rotation period so a device that missed the reply can catch up. - nameMinLength: integer; optional, default 1 - nameMaxLength: integer; optional, default 20 - tokenRotationSeconds: integer; optional, default 0 Depends on components: none How to use in a recipe A recipe uses it through a slot of class Guest identity (pkg:clod/com.clodhub/guest-identity-class 1.1.0), naming pkg:clod/com.clodhub/guest-identity as the slot's preferred component or substituting it for another component of the class. The recipe connects what it provides (guest-identity) to the slots that use it. The recipe sets nameMinLength, nameMaxLength and tokenRotationSeconds; any it leaves out takes its default. - as a slot in recipe.json components: {"id":"guest-identity","class":{"name":"pkg:clod/com.clodhub/guest-identity-class","version":"1.1.0","digest":"caa00dd7bf72676259d84772b6b9058de0b2a3eef2662b8eb4199b78bc3056ed"},"preferred":{"name":"pkg:clod/com.clodhub/guest-identity","version":"0.12.0"}} - in place of another component of the class: clod fetch guest-identity@0.12.0 --store store --from https://clodhub.com, then clod design RECIPE@VERSION --store store --answers answers.json --substitute SLOT=guest-identity@0.12.0 --out definition.json Used by recipes: pkg:clod/com.clodhub/ourpoker-recipe 0.13.0 (slot guest-identity) For developers: how an application uses it Server: `createIdentityApi(settings)` binds the three settings once and gives `validName(name)`, `checkName`, `claim(book, name, deps, token?)`, `authenticate(book, token, deps)`, `findByName` and `release`; seating calls its `validName` with one argument. Keep an `IdentityBook` in the room's storage; on a join request call `claim(book, name, deps, settings, token)` with the bearer token the device sent (if any) and return the new token; on every later request call `authenticate` and send back `rotatedToken` when it is not null. Web: `createIdentityStore(localStorage, settings)` keeps the name and sessions; `clipName` and `nameToSave` serve the name field. Apple and Android: `NameRules` and `IdentityStore` over `UserDefaults` or `SharedPreferences` (behind the small `KeyValueStore` interface). `examples/consumer.ts` shows a device returning with its token and another device refused the same name. realtime-rooms takes `createIdentityApi(settings)` as its required `guest-identity` port (`services.identity`): each room keeps one `IdentityBook` in its own storage and calls `claim` on a join with the device's bearer token (offering the id the game already holds for that name as `newId`), `authenticate` on every request and live message (sending `rotatedToken` to the device as the `x-rotated-token` header or a `{type:"token"}` message), and `release` when a guest leaves. The presence component uses the identity ids this component issues. Accounts and services No service. The identity book is plain data held by the caller (the room's own storage in the recipe). Tokens are stored as issued, as in the recipe, so the storage must be private to the server. How it is checked Required-local: `node --test tests/web.test.ts` checks the name rules against `tests/fixtures/names.json`, claim, return with the token, refusal of a name in use without its token, token cancellation, rotation and the one-period catch-up, release, ndjson export and import with a record digest, the bound `validName` against the same fixture, the bound claim and authenticate, the calls a room makes (a known id offered by the room is kept for a new name, a rejoin returns the same id and ends the old token, release frees the name, a rotated token is returned without changing the book given), settings checks, the device store, the example, and that every method in `interfaces/guest-identity.json` exists in the implementation for each language it is tagged with. Platform: `python3 tests/native.py apple` compiles and runs the Swift checks of the same fixture; `python3 tests/native.py android` compiles the Kotlin checks (needs kotlinc, not installed on the authoring machine, so not run there). - `node --test tests/web.test.ts` (web, required-local; tools: node 26.5) - `python3 tests/native.py apple` (apple, platform; tools: python3 3.12, swiftc 6.4) - `python3 tests/native.py android` (android, platform; tools: python3 3.12, kotlinc 2.2, java 26.0) Updates Patch updates replace files. Identity records are data: `migration.json` describes export to ndjson, import, verification by record digest and the record schema `com.clodhub/identity-record` 1.0.0. A name is not a secret: a name in use is held by its token, and a free name goes to whoever types it. realtime-rooms requires this interface as `guest-identity` and calls `claim`, `authenticate` and `release` of `createIdentityApi`; `tests/web.test.ts` has a test of exactly those calls. Tags: guest, identity, people-and-accounts, sign-in Targets: client android, ios, macos, tvos, web, windows; server none Publisher: George McIntyre (george-mcintyre) Guardians: Level N Ltd (guardian key 08775f20) Source: clodhub/guest-identity release v0.12.0; digest sha256:c7ad49e5fe1d54737df308c78025c93cd83fc1860b775d2603f430de274839cd Release: features Line 0.12: no security releases Quality: Integration-tested, certified Known vulnerabilities: none known (checked 2026-11-26 at OSV); https://clodhub.com/api/components/guest-identity/0.12.0/vulnerabilities Downloads: 1 in 30 days; 1 of this version Classes: https://clodhub.com/classes.txt; this component as JSON: https://clodhub.com/api/components/guest-identity/0.12.0 Bundle download: GET https://clodhub.com/api/components/guest-identity/0.12.0/bundle returns a link valid for one hour Implements: pkg:clod/com.clodhub/guest-identity-class@1.1.0 caa00dd7bf72676259d84772b6b9058de0b2a3eef2662b8eb4199b78bc3056ed com.clodhub/guest-identity 1.0.0 entry modules: android android/src/main/java, ios apple/Sources, macos apple/Sources, server server/index.ts, tvos apple/Sources, web web/index.ts, windows web/index.ts shared behaviour suites: shared Platforms: android, ios, macos, server, tvos, web, windows Toolchains: android >=8.0.0, ios >=17.0.0, java >=17.0.0 <27.0.0, kotlin =2.4.21, macos >=14.0.0, node >=26.5.0 <27.0.0, swift =6.4.2, tvos >=17.0.0 Frameworks: none Styles: scope none; 0 namespaces; 0 conflicts Licence: Apache-2.0; 0 upstream sources, 0 exact dependencies, 32 files (listed on the details page) Suitable for jobs: guest-identity profile any: cost none; load none; regions any; compliance none; any storage any Notes: No limits cited; none were checked. Data migration: stores identities (com.clodhub/identity-record 1.0.0); formats ndjson; requires stop no; retention 30 days Maintainers: Level N Ltd; https://github.com/clodhub/guest-identity/issues; updates https://github.com/clodhub/guest-identity/releases (manual) What you download guest-identity-0.12.0.tar, from release v0.12.0 of clodhub/guest-identity: 32 files - Documents and manifests (9): CONTRACT.md, INSTRUCTIONS.md, LICENCE, NOTICE, PROVENANCE.md, SOURCE.md, ... - Source code (6): android/ (1), apple/ (1), server/ (2), web/ (2) - Tests (6): android/ (1), apple/ (1), fixtures/ (2), native.py, web.test.ts - Interface documents (2): guest-identity.json, identity-record.schema.json - Class files: the class's interfaces and shared checks (3): guest-identity-class/ (3) - Examples (1): consumer.ts - Diagrams (5): definition.json, examples/ (1), output/ (3) Installing copies 6 of them into the application under components/guest-identity/: android 1, apple 1, server 2, web 2 Not included: the values of its settings, which the recipe writes; any secret The archive is a release file on the publisher's public GitHub repository; ClodHub keeps this page and a pointer to the release, not the code. clod checks the archive's sha256 fingerprint before anything is copied, and installing runs none of the package's code. Versions - 0.12.0 features (2026-11-26T11:27:06.800Z) sha256:c7ad49e5fe1d54737df308c78025c93cd83fc1860b775d2603f430de274839cd Links Details (package foundations, upstream sources, exact dependencies, styles, class inventories, files): https://clodhub.com/components/guest-identity/details.txt?version=0.12.0 Page: https://clodhub.com/components/guest-identity; JSON: https://clodhub.com/api/components/guest-identity/0.12.0; connections diagram: https://clodhub.com/api/components/guest-identity/0.12.0/connections.svg Copyright Level N Ltd 2026