Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fastify/csrf-protection

Package Overview
Dependencies
Maintainers
19
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastify/csrf-protection - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

8

package.json
{
"name": "@fastify/csrf-protection",
"version": "6.1.0",
"version": "6.2.0",
"description": "A plugin for adding CSRF protection to Fastify.",

@@ -38,3 +38,3 @@ "main": "index.js",

"@fastify/pre-commit": "^2.0.2",
"@fastify/secure-session": "^5.0.0",
"@fastify/secure-session": "^6.0.0",
"@fastify/session": "^10.0.0",

@@ -44,6 +44,6 @@ "@types/node": "^18.0.0",

"proxyquire": "^2.1.3",
"sinon": "^14.0.0",
"sinon": "^15.0.0",
"standard": "^17.0.0",
"tap": "^16.0.0",
"tsd": "^0.24.1"
"tsd": "^0.25.0"
},

@@ -50,0 +50,0 @@ "pre-commit": [

@@ -19,3 +19,3 @@ /// <reference types="node" />

options?: fastifyCsrfProtection.CookieSerializeOptions
): FastifyReply;
): string;
}

@@ -22,0 +22,0 @@ }

import Fastify from 'fastify'
import FastifyCookie from '@fastify/cookie'
import FastifyCsrfProtection, { FastifyCsrfOptions } from '..'
import { expectError, expectDeprecated } from 'tsd'
import { expectError, expectDeprecated, expectType } from 'tsd'
import FastifySession from '@fastify/session'

@@ -17,3 +17,5 @@

handler: async (req, reply) => {
return reply.generateCsrf()
const token = reply.generateCsrf()
expectType<string>(token)
return token
}

@@ -20,0 +22,0 @@ })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc