Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / / rekeyTokens
Function: rekeyTokens()
ts
function rekeyTokens(options): Promise<ReadonlyMap<string, CreatedToken>>;Defined in: packages/security/src/auth/crud.ts:234
Re-issue every active token. Used after a known compromise: the previous tokens are revoked and replaced with fresh raw values using the same scopes / labels.
Returns the new tokens keyed by their old id so the caller can route the rotated raws back to the right user.
Parameters
| Parameter | Type |
|---|---|
options | { env: string; now?: () => number; pepper: SecretValue; prefix?: string; tokenStore: AuthTokenStore; } |
options.env | string |
options.now? | () => number |
options.pepper | SecretValue |
options.prefix? | string |
options.tokenStore | AuthTokenStore |
Returns
Promise<ReadonlyMap<string, CreatedToken>>