Generate and verify CSRF tokens
Bun.CSRF object | API Reference | Bun BuildDocsReferenceGuidesBlogDiscord/Bun/CSRFFgenerateFverify BuildDocsReferenceGuidesBlogDiscord /Bun/CSRFFgenerateFverify CSRFnamespace CSRF function generate(secret?: string,options?: CSRFGenerateOptions): string; @param secret @param options @returns function verify(token: string,options?: CSRFVerifyOptions): boolean; @param token @param options @returns
Search the reference...
/
namespace
Generate a CSRF token.
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.
Verify a CSRF token.
The token to verify.
The options for the token.
True if the token is valid, false otherwise.
Resources
ReferenceDocsGuidesDiscordMerch StoreGitHubBlogToolkit
RuntimePackage managerTest runnerBundlerPackage runnerProject
Bun 1.0Bun 1.1Bun 1.2Bun 1.3RoadmapContributingLicenseBaked with ❤️ in San Francisco
We're hiring →Bun.CSRF object | API Reference | Bun,AI智能索引,全网链接索引,智能导航,网页索引
- Generate and verify CSRF tokens