Skip to content

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

ParameterType
optsGenerateRawTokenOptions

Returns

ts
{
  entropyBytes: Buffer;
  raw: string;
}
NameTypeDefined in
entropyBytesBufferpackages/security/src/auth/token-format.ts:241
rawstringpackages/security/src/auth/token-format.ts:240

Stable