Interface TokenGeneratorOptions

Options for creating a new generator with createTokenGenerator.

interface TokenGeneratorOptions {
    entropyBytes?: number;
    prefixWithoutUnderscore: string;
}

Properties

entropyBytes?: number

Must at least be 21.

Default

22 bytes like in the npm/GitHub token format
prefixWithoutUnderscore: string

The prefix of the token without the underscore. Prefer short prefixes. See which prefixes GitHub uses: https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/

Generated using TypeDoc