township-cookie
v1.0.0
Published
cookie management for township servers
Downloads
1
Readme
township-cookie
helpers for using cookies with township
About
If your use case requires you to store the JWTs that township creates in cookies rather than localstorage or similar, this module can help.
Install
npm install --save township-cookie
Usage
var townshipCookie = require('township-cookie')
var cookies = townshipCookie({
name: 'example',
hostname: 'example.com'
})
// set a cookie with a JWT token on a response object
cookies.set(res, token)
// get a token from a cookie on a request object
var token = cookies.get(req)
// remove a cookie from a response object
cookies.remove(req)
Contributing
Contributions are welcome! Please read the contributing guidelines first.
Conduct
It's important that this project contributes to a friendly, safe, and welcoming environment for all, particularly for folks that are historically underrepresented in technology. Read this project's code of conduct