Appearance
zero-auth API Documentation v1.6.0
zero-auth API Documentation / CsrfConfig
Interface: CsrfConfig
Defined in: packages/zero-auth/src/types/auth.ts:204
Configuration for the signed double-submit CSRF middleware.
Properties
cookieName?
optionalcookieName?:string
Defined in: packages/zero-auth/src/types/auth.ts:206
Client-readable CSRF cookie name.
Default
ts
"csrf_token"headerName?
optionalheaderName?:string
Defined in: packages/zero-auth/src/types/auth.ts:208
Header carrying the token copied from the CSRF cookie.
Default
ts
"x-csrf-token"methods?
optionalmethods?:string[]
Defined in: packages/zero-auth/src/types/auth.ts:210
HTTP methods to protect.
Default
ts
["POST", "PUT", "PATCH", "DELETE"]secret?
optionalsecret?:string
Defined in: packages/zero-auth/src/types/auth.ts:212
Optional symmetric secret for signing CSRF tokens.