Module

Biscotti.Session.Store.Cookie

Package
purescript-biscotti-session
Repository
drewolson/purescript-biscotti-session

The Cookie session store uses libsodium to encrypt and decrypt session data directly in the cookie. You'll need to install the npm package libsodium-wrappers:

npm install libsodium-wrappers

You create a Cookie store by calling Biscotti.Session.cookieStore with a name for your session cookie and a libsodium-compatible secret, hex encoded.

import Biscotti.Session as Session

let store = Session.cookieStore "_my_app" "724b092810ec86d7e35c9d067702b31ef90bc43a7b598626749914d6a3e033ed"

Note: This is an example secret. Please don't commit your production secret to your git repo or post it on the internet. Also, please don't use this secret as it is already posted on the internet. It's literally right above this paragraph and you're reading this on the internet.

#new Source

new :: forall a. DecodeJson a => EncodeJson a => String -> String -> SessionStore a