0.0.3 • Published 5 years ago
grant-session v0.0.3
grant-session
Session handler for Grant
{
handler: 'aws', // required
name: 'grant',
secret: '...', // required
cookie: {path: '/', httpOnly: true, secure: false, maxAge: null},
embed: false,
store: {
get: async (key) => {},
set: async (key, value) => {},
remove: async (key) => {},
}
}handler- Grant handler name, eithernode,awsorvercelrequiredname- the name of the session cookie, defaults tograntsecret- used to sign the cookie requiredcookie- cookie options, defaults to{path: '/', httpOnly: true, secure: false, maxAge: null}embed- embed the session data into the cookie, possible value:truestore- external session store implementation,embedhave to be falsy and the store methods have to be implemented
Either embed have to be true or the store have to be implemented!