Skip to content

importStreamTokenKey

importStreamTokenKey(secret): Promise<CryptoKey>

Defined in: packages/server/src/circuits/stream-token.ts:98

The signing key. HMAC-SHA256 over a compact JWS: the same process mints and verifies, so there is one trust domain and no reason to pay for asymmetric keys — and no reason to take a JWT dependency into a published library for what Web Crypto already does.

The token still IS a JWT, so it stays readable by ordinary tooling when someone has to debug one.

string

Promise<CryptoKey>