Token Manager

Block

Full bearer token management UI. Create scoped tokens, copy them on first generation, and revoke them with a confirmation step. Manages state internally; wire onGenerate/onRevoke to your backend.

internal/token-manager

Installation

1 · Add registry to components.json

2 · Install component

Examples

With seed tokens

Two existing tokens and a Generate button. Click Generate to create a new mock token.

API Reference

PropTypeDescription
tokensreq
TokenEntry[]Initial token list.
scopesreq
TokenScope[]Available scopes for the generate dialog.
onGenerate
(opts) => Promise<TokenEntry>Called when the generate form is submitted. If omitted, a mock token is created client-side.
onRevoke
(id: string) => Promise<void>Called after the user confirms revocation.