Ingest bot
- Scopes
- readings:writegauges:read
- Last used
- 2h ago
- Expires
- Jun 3, 2027
KQ-1666 · TOKEN/LOCKER
API token management where a new token is shown once: its characters resolve in place left to right inside 600ms beside a Copy button and a ring that drains linearly, paused under the pointer, then the mask sweeps across a step per character and the panel folds back into its row on springs.glide. Revoking strikes the name through on springs.flick and, a beat later, the row slides down into Revoked as one shared-layout move on glide. Tab reaches every action, C copies the revealed secret, Escape closes a confirm or the create form, and onCreate, onRotate and onRevoke fire.
Gaugeworks · 4 active tokens · 1 revoked
gaugeworks · 4 active · 1 revoked
One command — the source lands in your repo. Or copy it from the Code tab.
$ pnpm dlx shadcn@latest add @kinetiq/token-locker
| Prop | Type | Default | Description |
|---|---|---|---|
| tokens | LockerToken[] | defaultLockerTokens | Seeds the tokens ({ id, name, scopes, created, lastUsed, expires, hint, revoked? }); the locker owns them after that and reports every change. |
| scopes | LockerScope[] | defaultLockerScopes | The scopes on offer, { id, label, group }, shown as grouped checkboxes under tri-state group boxes. |
| onTokensChange | (tokens: LockerToken[]) => void | — | Fires with every token after a create, rotate or revoke. |
| onCreate | (draft: LockerDraft) => LockerSecret | Promise<LockerSecret> | — | Create was confirmed with { name, scopes, expiresInDays }. Return the new secret (or a promise of it); without one a seeded placeholder is minted. A rejection is reported in the form. |
| onRotate | (token: LockerToken) => LockerSecret | Promise<LockerSecret> | — | Rotate was confirmed. Return the replacement secret, as for onCreate; it is shown once in the token's row. |
| onRevoke | (token: LockerToken) => void | Promise<unknown> | — | Revoke was confirmed. A rejection leaves the token active and says so. |
| now | number | defaultLockerNow | Now in ms, for last used, expiry and the stale flag. |
| revealSeconds | number | 30 | How long a new secret stays readable before it is masked for good, seconds. |
| staleDays | number | 90 | A token unused for this many days (or never used and this old) is flagged. |
| prefix | string | "gw_live_" | Printed before every secret and every stored hint. |
| workspace | string | "Gaugeworks" | The workspace the tokens belong to, named in the header and the empty state. |
| status | "ready" | "loading" | "error" | "ready" | Whether the tokens have loaded; loading shows skeleton rows, error offers Try again. |
| onRetry | () => void | — | Try again was pressed after the tokens failed to load. |
| maskStyle | "blur" | "dots" | "bars" | "blur" | How a secret is hidden, in the sweep and at rest: blurred, dotted out, or redacted with bars. |
| density | "compact" | "regular" | "roomy" | "regular" | Row padding, button height and type size. |
| palette | "cobalt" | "signal" | "amber" | "graphite" | "cobalt" | The reveal panel's wash, the countdown ring, the resolve and the primary buttons. |
| title | string | "API tokens" | The heading and the locker's accessible name. |
| height | number | 520 | Height of the locker, px; the list scrolls inside. |
| disabled | boolean | false | Create, rotate and revoke are inert; the locker dims. |
| className | string | — | Classes for the outer locker. |