req.session undefined with Redis/Express

I switched from memorystore to using Redis and I also use MongoDB locally.

Similar posts that I have read are not relevant or helpfull. Basicly, if the router function try's to set a value to req.session the node app shuts down.

I am new to Redis, so maybe it is something obvious that I don't see?

// in app
var app = express();
var cookieParser = express.cookieParser('secret');
app.configure(function () {
  app.use(express.bodyParser());
  app.use(cookieParser);
  app.use(express.session({secret: 'secret', store: othermodule.getSessionStore()})); 

// othermodule
var RedisStore = require('connect-redis')(express);  
var sessionStore = new RedisStore({
    host: 'localhost',
    port: 6379,
    db: 2,
    pass: 'RedisPASS'});

thanks

Try removing the password in your options you pass to RedisStore.

If you want you can require the clients to give a password when connecting. But by default no password is required for clients to connect. If no password is required and you give a password, the client will try authenticating using the given password which will cause a connection failure. The fallback to using no password is not allowed at the client. Because of which you were getting session as undefined.

See here and here for configuring passwords.