I am attempting to test middleware functions in my Express application using supertest and nock, but am having issues where the routes I have setup are checked by an earlier piece of middleware to ensure a session property exists on the incoming req…
I'm using express-sessions in a project and I'm struggling to understand when it creates a cookie on the browser to use with the session storage.
In my project when I request my home page ("/") a cookie isn't created, however when I request any…
I am trying to use the express-session package for session management in an express-js application.
I have the following requirements:
Cookie is destroyed client-side when browser is closed.
Cookie is destroyed after 15 minutes idle time.
Cookie is…
I am using express-session module for session handling in my express.js app
My express.js application creates session for user and admin privileges.
I have req.session.user & req.session.admin
The problem I have is I don't know how to close 1…
I'm writing a single page application with MEAN stack, and using express-session with redis for session management.
I want to use scrf token in my client's cookies.
the problem is when I add csurf middleware, it set a session with name csrfSecret in…
I'm using the cookie-session module for Expresss.js to deal with sessions.
I would like the sessions to be renewed on every page load (or ajax call). That's how they usually work anywhere.
The documentation doesn't say a word about it.
I've tried…
In DegitalOcean, i have to manage two servers 'Nodeserver' and a redis server 'Redisserver' by making the connection possible from a node/express application on the former for using the latter's database.
For the purpose of local tests, i've also…
I'm new to NodeJS. I am developing a REST API and using express-session to deal with sessions. So, to get the session ID I'm using
var sessionID = req.sessionID
This sessionID is generated from the server side. So, when I scale up to two or more…
Using express-session and storing session in files. However every request it is creating new session id and new file is getting created.
Here is the code which i am using to create the session.
app.use(session({ secret: 'keyboard cat',
resave:…
I have issue with express-session in node js and express 4. I set a session variable inside routes/index.js and is not available in app.js.But available on another route file users.js
routes/index.js
var…
When I build MERN stack app I use axios withCredentials: true. And it work well. After I use this next.js but don't work In backend I use passport.js , passport-local-mongoose and express-session for authentication user. It don't work next.js app…
So I built an app that uses passport and express session for its authentication. When I deployed, I discovered that safari was not letting express session work until I switched off 'cross site tracking' in its settings. How do I make this…
The problem I am facing is down to reading a role property of a session set by the users role in a database. Why is this behaviour happening? It makes it difficult to develop new features which rely on backend control of API…
Here is some sample code that outlines my issue. I'm trying to get express-session / connect-session-sequelize to work for a website with login functionalities.
However, when I try to call my POST request, I get the following error:
I can only…