Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/security / / generateRawToken
Function: generateRawToken()
ts
function generateRawToken(opts): {
entropyBytes: Buffer;
raw: string;
};Defined in: packages/security/src/auth/token-format.ts:239
Generate a brand-new raw token. The result is the only place the plaintext value exists; callers MUST hand it to the user immediately and persist only the HMAC hash via the AuthTokenStore contract.
Parameters
| Parameter | Type |
|---|---|
opts | GenerateRawTokenOptions |
Returns
ts
{
entropyBytes: Buffer;
raw: string;
}| Name | Type | Defined in |
|---|---|---|
entropyBytes | Buffer | packages/security/src/auth/token-format.ts:241 |
raw | string | packages/security/src/auth/token-format.ts:240 |