Generate a CSRF token.
Symbol
CSRF.generate
@param secret
The secret to use for the token. If not provided, a random default secret will be generated in memory and used.
@param options
The options for the token.
@returns
The generated token.
Referenced types
interface CSRFGenerateOptions
- expiresIn?: number
The number of milliseconds until the token expires. 0 means the token never expires.