I'm new to node.js and sessions, I'm trying to store some values in the node.js session, but everytime I reload the page and check the console.log the session haven't been saved. My code:
var session;
var org;
function checkSession(argument){
var…
I need to remove mongodb documents after a specified period of not being accessed.
I have a access token I use to retrieve data from an external source and save it in my database.
In my session I store a user id I can use the retrieve the access…
I am making a chat for customers of a web page, with express.js, and socket.io, and I'm trying to manage sessions with express-session, my problem is, how do I read the session values on the socket.
Here's part of my code.
Thanks for the help :)
var…
I have a route written in Express as the following:
app.get("/route", function(req, res){
if (someBoolean){
someFunction(stuff, function(user){
...
req.session.user = user;
});
}
…
My application is currently being opened from my file system and makes requests to a server hosted on cloud 9. Whenever I submit information from the same page I make two requests from the same page.
One request is to create a new resource and the…
I am currently working on a web application that requires an user login snippet. I have built an API for getting user information and others. But I cannot let NodeJS work with sessions.
So, I have an API endpoint like this for logging in:…
Using node v12, Express 4, and connect-pg-simple
During our security evaluation is was discovered that if a user logs in successfully, and logs in again successfully, that the prior session remains valid.
I'd like for the second login to revoke the…
I am using express-session with Express 4. I am confused about how I pass the secret from the client to the server. I assume that I need to pass the secret for every request, otherwise I don't really understand what the secret is for.
var session =…
I have a page and I want to track what the current user is doing. For this, the server gives him an id, and than, I'd like to send a XmlHttpRequest to log information, and I'd like to keep its id.
However, the request received by my server as an…
Here's the code:
app.get('/vklogin', function(request, response) {
console.log('Авторизация через соц.сеть "Вконтакте"'.green);
var url_parts = url.parse(request.url, true);
var query = url_parts.query;
var data = querystring.stringify({
…
I have Express with Passport authentication and have added session to it as below.
app.use(cookieParser()); // read cookies (needed for auth)
app.use(bodyParser()); // get information from html forms
app.set('view engine', 'ejs'); // set up ejs for…
I am creating a login application where I need to redirect back to previous url from where the login action was called. I need to know does sails provide a built-in method by using which I can redirect to previous action without creating my own…
So I'm using express-session package to set cookie and session. It's also connected to my MongoDB store to store session. When user logs in, session gets stored in database just fine but there's no cookie in the browser. My app is running in…
Environment: Node.js, Express, express-session
Question: Is it possible to save just one property of a session instead of saving over the entire session?
Background: Normally express-session saves the session at the end of each http response, i.e.…