keycloak-nodejs-connect
keycloak-nodejs-connect copied to clipboard
provide options to cookie storage
Allow user to provide custom options for cookie storage like httpOnly mode or custom expiration date:
const keycloak = new Keycloak(
{
cookies: true,
cookieOptions: { maxAge: 900000, httpOnly: true },
},
{
realm: 'example',
// ...
}
};
I would like to see this added as well. A workaround for me has been:
app.use(function (req, res, next) {
var org = res.cookie;
res.cookie = function (name, value, options) {
// Change options here
org.call(this, name, value, options);
};
next()
})