csurf icon indicating copy to clipboard operation
csurf copied to clipboard

feat: expose generate/verify middlewares

Open sushantdhiman opened this issue 3 years ago • 4 comments

Fixes #10

Default exported function now returns a middleware function with two extra members generate and verify. Properties generate and verify are both middleware functions, which can be used to separate token generation and token verification process. Please check tests and Readme for example.

This should be a non breaking change, as you can still use app.use(csurf()) without any other modification.

sushantdhiman avatar May 24 '21 08:05 sushantdhiman

Hi @dougwilson, Anything I can do to get this merged?

sushantdhiman avatar May 31 '21 04:05 sushantdhiman

Any comments from maintainers of this project?

sushantdhiman avatar Jun 16 '21 07:06 sushantdhiman

This fix is available as csurf-sep on npm, if anyone needs this fix

https://www.npmjs.com/package/csurf-sep

sushantdhiman avatar Jul 08 '21 06:07 sushantdhiman

I am no longer using express/csurf but would like to get this merged. Is there any thing I can do to get this reviewed sooner? If this fix is not required I can close this PR?

sushantdhiman avatar Nov 05 '21 07:11 sushantdhiman