I always get the same error when I try to run my site on localhost with apache and self-signed ssl certificate. I have no idea why this error appears. This is my session persistence, I don't know if there is a misstake, but I can't imagine.... Further down you can finde the error.
I am quite lost at the moment with this issue
app.use(cookieParser(sessionSecret));
app.use( session( {
store: sessionStore,
secret: sessionSecret, resave: false, saveUninitialized: true,
cookie: {secure: true, maxAge:24*60*60*1000},
genid: function (req) {return uuid.v4()}
}));
app.get('/login*', function (req, res) {console.log("login session is: "+req.session); loadSelectedFile(req, res);});
Error: secret option required for sessions
at session (C:\xampp\htdocs\node_modules\express-session\index.js:167:12)
at Layer.handle [as handle_request] (C:\xampp\htdocs\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\xampp\htdocs\node_modules\express\lib\router\index.js:317:13)
at C:\xampp\htdocs\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\xampp\htdocs\node_modules\express\lib\router\index.js:335:12)
at next (C:\xampp\htdocs\node_modules\express\lib\router\index.js:275:10)
at cookieParser (C:\xampp\htdocs\node_modules\cookie-parser\index.js:56:14)
at Layer.handle [as handle_request] (C:\xampp\htdocs\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\xampp\htdocs\node_modules\express\lib\router\index.js:317:13)
at C:\xampp\htdocs\node_modules\express\lib\router\index.js:284:7
at Function.process_params (C:\xampp\htdocs\node_modules\express\lib\router\index.js:335:12)
at next (C:\xampp\htdocs\node_modules\express\lib\router\index.js:275:10)
at expressInit (C:\xampp\htdocs\node_modules\express\lib\middleware\init.js:40:5)
at Layer.handle [as handle_request] (C:\xampp\htdocs\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\xampp\htdocs\node_modules\express\lib\router\index.js:317:13)
at C:\xampp\htdocs\node_modules\express\lib\router\index.js:284:7