0.0.3 • Published 4 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
,aws
orvercel
requiredname
- the name of the session cookie, defaults togrant
secret
- 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:true
store
- external session store implementation,embed
have to be falsy and the store methods have to be implemented
Either embed
have to be true
or the store
have to be implemented!