Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

feat: expose generate/verify middlewares #240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sushantdhiman
Copy link

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
Copy link
Author

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

@sushantdhiman
Copy link
Author

Any comments from maintainers of this project?

@sushantdhiman
Copy link
Author

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

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

@sushantdhiman
Copy link
Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

separating token creation and checking
3 participants