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

township/township-cookie

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

township-cookie

helpers for using cookies with township

npm travis standard conduct

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

License

ISC

About

helpers for using cookies with township

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published