Generate a CSRF token.
function generate | Bun module | Bun BuildDocsReferenceGuidesBlogDiscord/Bun/CSRF/generateFgenerate BuildDocsReferenceGuidesBlogDiscord /Bun/CSRF/generateFgenerate CSRF.generatefunction generate(secret?: string,options?: CSRFGenerateOptions): string; @param secret @param options @returns Referenced typesinterface CSRFGenerateOptionsalgorithm?: CSRFAlgorithm encoding?: 'base64' | 'base64url' | 'hex' expiresIn?: number
Search the reference...
/
function
The secret to use for the token. If not provided, a random default secret will be generated in memory and used.
The options for the token.
The generated token.
The algorithm to use for the token.
The encoding of the token.
The number of milliseconds until the token expires. 0 means the token never expires.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →function generate | Bun module | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- API documentation for function bun.CSRF.generate | Bun