{"library":"csrf-sync","type":"library","category":null,"description":"CSRF Sync is a utility package designed to provide robust stateful Cross-Site Request Forgery (CSRF) protection for Express applications, utilizing the Synchroniser Token Pattern. Developed in response to the deprecation of `csurf` and the perceived complexity or limited scope of alternative solutions, `csrf-sync` (current stable version 4.2.1) aims for a targeted and simplified implementation. It requires a server-side session management middleware like `express-session` to store tokens. The library focuses on providing the essential components for CSRF protection without imposing a full solution, allowing developers to integrate it flexibly. It is actively maintained with regular updates and follows a clear versioning strategy, with significant changes typically highlighted in major version bumps.","language":"javascript","status":"active","version":"4.2.1","tags":["javascript","csrf","middleware","express","tokens","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install csrf-sync","imports":["import { csrfSync } from 'csrf-sync';","const { csrfSynchronisedProtection } = csrfSync();","const { generateToken } = csrfSync();"]},{"cmd":"yarn add csrf-sync","imports":[]},{"cmd":"pnpm add csrf-sync","imports":[]}],"homepage":null,"github":"https://github.com/Psifi-Solutions/csrf-sync","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/csrf-sync","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/csrf-sync/compatibility"}}