csurf
csurf copied to clipboard
feat: expose generate/verify middlewares
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.
Hi @dougwilson, Anything I can do to get this merged?
Any comments from maintainers of this project?
This fix is available as csurf-sep
on npm, if anyone needs this fix
https://www.npmjs.com/package/csurf-sep
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?