I want to log a user in and store there session so i can identify them.
and then have some code on the back end that gets there data from and allows me to pass the username into another db method.
i have the following, but want to use session…
In my node app I use 4 routes to get data and asynchronously when the data is received, I'm setting the session. I use express.js and expression-session npm. But setting the session works time to time. (sporadically setting the data) . Sometimes…
Running my third party js app, it has seen so weird when play with session on the IE .
From here no problem using Chrome, FF and Safari.
My apps has the following design:
Any client can use my third party js code.
So, this widget.js just does a call…
I am using socket.io along with express sessions. I am using their middleware to get the cookie in the header, like:
io.use(function(socket, next) {
console.log(socket.handshake.headers.cookie);
next();
});
which puts this to the…
I am trying to access session data from node.js that is stored in redis.
In the redis-cli I ran Keys * and returned
1) "sess:ZRhBJSVLjbNMc-qJptjiSjp8lQhXGGBb"
2) "sess:6p1EcGvJukTT26h88NqoTGdz2R4zr_7k"
If I then run GET I get back what looks like a…
I'm trying to access session variables in EJS views, but facing lots of problems.
To access the req.session locally I'm using middleware as described here Accessing Express.js req or session from Jade template
var express = require('express');
var…
Can't seem to figure out how to use redis store for sessions with Express 4, some sample code looks like:
var express = require('express');
var app = express();
var cookieParser = require('cookie-parser');
var bodyParser =…
Here I used the express-session to store user session but only to find that the req.session.user always undefined.
It's funny that when I used chrome plugin postman to visit, there's no problem.
so how to fix it ?
var session =…
In my frontend react application, I am trying to check if a session cookie exists, as this will help me decide whether to show a login page (if no session cookie exists or invalidated), or show content page.
The backend express-session middleware…
express-session is refusing to save the session data for my users.
It is saving the session cookie, but the data is not persisting.
Here is my server.js.
Hi. When i print the req.session.mySessValue in UI , the value is empty. I think the assigning of req.session.mySessValue = dt.myValue; (express-session) is not proper.…
I have a database in mongo to store session state called 'SessionStore' with a collection called 'Sessions' to store session state.
I'm using expression-session for managing sessions.
Code to setup sessions is as follows;
var session =…
I currently have a chrome extension that GET's javascript from my node.js server. However the javascript file I want to serve will depend on the number of times https://www.google.co.uk/ has been visited.
I want to perform this on the server side,…
This simple bit of code illustrates the problem: The second session does not save. How can I make this work?
router.post('/users/login', function (req, res) {
var db = req.usersDb;
var users = db.get('users');
req.session.test = "This works";
…
So I'm building an app with angular on the front and nodejs/express on the backend. My problem is that when using express-session, each request creates a new session cookie.
I have searched through a lot of questions and answers but it seems that…