Received this error:
/Users/rockbot/npm-inc/newww/node_modules/hoek/lib/index.js:669
throw arguments[1];
^
ValidationError: child "appendNext" fails because ["appendNext" must be a boolean]
at Object.exports.process (/Users/rockbot/npm-inc/newww/node_modules/hapi-auth-cookie/node_modules/joi/lib/errors.js:140:17)
at internals.Any._validateWithOptions (/Users/rockbot/npm-inc/newww/node_modules/hapi-auth-cookie/node_modules/joi/lib/any.js:642:25)
at root.validate (/Users/rockbot/npm-inc/newww/node_modules/hapi-auth-cookie/node_modules/joi/lib/index.js:102:23)
at Object.internals.implementation [as cookie] (/Users/rockbot/npm-inc/newww/node_modules/hapi-auth-cookie/lib/index.js:41:23)
at internals.Auth.strategy (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/auth.js:47:41)
at internals.Plugin._applyChild (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/plugin.js:449:19)
at Object.auth.strategy (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/plugin.js:61:65)
at /Users/rockbot/npm-inc/newww/server.js:90:15
at done (/Users/rockbot/npm-inc/newww/node_modules/hapi/node_modules/items/lib/index.js:30:25)
at Object.exports.register (/Users/rockbot/npm-inc/newww/node_modules/hapi-auth-cookie/lib/index.js:15:5)
at /Users/rockbot/npm-inc/newww/node_modules/hapi/lib/plugin.js:242:14
at iterate (/Users/rockbot/npm-inc/newww/node_modules/hapi/node_modules/items/lib/index.js:35:13)
at Object.exports.serial (/Users/rockbot/npm-inc/newww/node_modules/hapi/node_modules/items/lib/index.js:38:9)
at internals.Plugin.register (/Users/rockbot/npm-inc/newww/node_modules/hapi/lib/plugin.js:224:11)
at Object.<anonymous> (/Users/rockbot/npm-inc/newww/server.js:80:8)
at Module._compile (module.js:456:26)
Here's the code that we've written (worked fine with version 2.0.0):
server.auth.strategy('session', 'cookie', 'required', {
password: process.env.SESSION_PASSWORD,
appendNext: 'done',
redirectTo: '/login',
cookie: process.env.SESSION_COOKIE,
clearInvalid: true,
validateFunc: function (session, cb) {
cache.get(session.sid, function (err, item, cached) {
if (err) {
return cb(err, false);
}
if (!cached) {
return cb(null, false);
}
return cb(null, true, item);
});
}
});
Sidenote: if this was a purposeful, breaking change, the community would expect the version to be bumped to 3.0.0, not 2.1.0.
Received this error:
Here's the code that we've written (worked fine with version 2.0.0):
Sidenote: if this was a purposeful, breaking change, the community would expect the version to be bumped to 3.0.0, not 2.1.0.