I have a PWA with session cookie based Authentication. I set a message for my cookie session for prevent cookies to be destroyed when I close my browser. Everything works fine except when I install my PWA in android home screen. If i log in from my home screen shortcut and then I kill the process of my installed PWA and I reopen it, I have to log in again my session cookie seems to be lost. Why? cookies are destroyed when you kill installed PWA process? Thank you in advance for your help.
sessionConfig = {
store: new RedisStore({
host: process.env.REDIS_HOST,
port: process.env.REDIS_PORT,
pass: process.env.REDIS_PASSWORD
}),
secret: config.SESSION_SECRET,
name: 'mcdvsid',
saveUninitialized: false,
resave: false,
cookie: { secure: config.COOKIE_SECURE, maxAge: ONE_YEAR }
};
}
app.use(session(sessionConfig));