I am getting the below error while trying to use express session with a simple nodejs sample app.
When "resave" is set to true the below error appears, however when the same is set to false, there is no error.
GET / 304 13.380 ms - - Error: Can't…
Every time I close all the browser windows and then open the web app again, a new session is established, that means I have to authenticate again.
For your reference, I use express@4.14.0 as the web application framework, express-session@1.14.1 +…
I have an Express JS app that uses express-session for session management.
I am trying to save some values to session in controller A and consume them in controller B, and send them as context to a template like so:
controllerA: function(req, res,…
I am using express-session for session management in my node js application.
using session-file-store. I want to count the number of sessions, to restrict new sessions after maxAllowed sessions.
Is there any method supported for doing that? I dont…
I have a scenario below as
On browser I open a website in which after getting authenticated with the system(i.e. access.abc.com) I get a cookie and I set it on client, i.e. connect.sid with domain as .abc.com
On same browser I open another webiste…
I have an express.js file which requires config.js which loads development.js. Now I want to use secret as a variable in session object of express-session. I will give you a quick breakup of how I had setup my code so far.
Config folder
Env
--…
Express-session is creating a new session (new sessionID) for new request. And it happens intermittently, for example sometimes for first 3-4 hits it will work fine and keep using same existing session and on 4th hit it will create a new one,…
I use express-session to set up session management in the following way:
var express = require('express');
var session = require('express-session');
var app = express();
var mongoose = require('mongoose');
var MongoStore =…
Im new working with nodeJS. I have a webpage (with AngularJS) in a AWS ec2-server that gets information from a nodeJS(Express) server. Im trying to keep logged my users once they log in, even if they refresh. I have read that I can do that using…
I'm wondering why req.session.username is undefined in the tag >>>DOESNT WORK<<< while it does work in the tag >>>THIS DOES WORK<<< . I brought in req as an argument to my module but it seems I'm supposed to do something else? The /ajax route is…
I have two pages, login and myservices. After a user logs in, they will be brought to myservices page, and their username should be shown.
in login.js, I have:
req.session.user = "abc";
res.redirect('/myservices');
and in myservices.js, I…
I am running an Express node.js app that allows users to login with the PassportJS local or LinkedIn strategies and, for most users, that's working fine - they log in and see their profiles.
For a small set of users (maybe 5%), when they first click…
i have a problem with Node.js running on a raspberry pi with linux operating system.
On my local computer the program just runs fine. But as soon as i start it on the pi I receive following error message
TypeError: app.use() requires middleware…
I'm using express-session and trying to use Postgres as my session store:
app.use(session({
store: new (require('connect-pg-simple')(session))(),
secret: 'mysessionsecret',
resave: false,
cookie: {
maxAge: 7 * 24 * 60 * 60 *…