expressjs / csurf

CSRF token middleware
MIT License
2.3k stars 216 forks source link

Token Lifetime #156

Open ran-j opened 6 years ago

ran-j commented 6 years ago

Can I set the Token Lifetime ? and whats is the default lifetime ?

dougwilson commented 6 years ago

Setting a specific lifetime is currently not implemented. Currently the tokens last as long as the secret is valid. If you store the secret in a session, then it lasts as long as the session. You're welcome to make a PR to implement any kind of granularities you need!

gregmartyn commented 5 years ago

160