The session of my nodejs app is expiring every time I refresh the page, after login. It does work fine if I visit different pages but as soon as I refresh the page, the session ends. I've tried a couple of things but none of it seems to work. How…
I cant understand how i can set cookie (connect sid) in REACT from my back-end.
I have a Passport Local Strategy
Here is my server.js
app.use(cookieParser());
app.use(session({
resave: true,
saveUninitialized: false,
secret: 'bla bla bla',
…
I am currently trying to implement session management using express 4.x and socket io 1.4, referencing this answer. The problem is that the second argument to the express session function is the res (response) object which is returning 'undefined'…
I have an application built on express, express-session and ws ( for the websocket support).
I have used this code to enable the session middleware:
app.use(session({secret: 'mysecret',resave: true,saveUninitialized: true,cookie: {}}));
And I can…
I typed npm start to run my program but this is the comment that U received in the terminal: express-session deprecated req.secret; provide secret option app.js:27:9. I don't understand how this issue needs to be fixed.
This is the code from…
I am using session-file-store to maintain the sessions in my Node-Express app.
session-file-store generates a new file for every session. This will create lots of files on the server over time.
Is there any option / way to automatically delete the…
I am trying to save a session variable for a user when they login. This works on the computer, but when I try it on an iPad using Safari or Chrome it doesn't save.
Here is where I set up my session:
app.set('trust proxy', 1)
app.use(session({
…
I'm using a passport local strategy that works well with express:
passport.use(localStrategy);
passport.serializeUser((user, done) => done(null, JSON.stringify(user)));
passport.deserializeUser((obj, done) => done(null,…
I'm using express js 4 together with express-session
and set maxAge to one hour. However if user continues accessing the website, the timeout should be extended otherwise the user will be logged out even he/she is still using it.
app.use(session({
…
I'm working on facebook, google, github, twitter authentication with passport. Authentication with facebook, google, github are executing how in tutorial was written. Only twitter back me message:
500 Internal Server Error: OAuth authentication…
I have some Express middleware handling GET requests from my client side application to make subsequent requests to a separate API server that uses OAuth2 tokens, I am also using express-session for the storage of these tokens.
In my middleware that…
So I'm using express-session with a mongo store like so:
app.use(session({
secret: 'some secret here',
saveUninitialized: false,
resave: false,
store: new MongoStore({
url: 'http://someurlhere'
})
}));
I have some login middleware,…
I use node express 4.0 to implement a message code verify function.
I use session to store the msg code I send.
I set up the session middleware as dos said:
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
…
I am using Redis as session store and I would also like to create custom session id with express-session. So far I achieved was creating session with constant string like this:
redis configuration
var express = require('express');
var path =…
I have a NodeJS Express app that uses express-session. This works great, as long as session cookies are supported.
Unfortunately it also needs to work with a PhoneGap app that does not support cookies of any kind.
I am wondering: Is it possible to…