Questions tagged [express-session]

Simple session middleware for Express

The express-session module is a simple session middleware for Express.

937 questions
-1
votes
1 answer

What is mean by 'clear the login session' in node js?

I am using express-session node module, trying to understand session in node js. Why we use cookies ? -> HTTP is stateless protocol, in order identify request come from same user we use cookie to identify user. By using express-session we can set…
-1
votes
1 answer

Undefined push to array - Basic Application using ExpressJs and MySQL

First of all, I have to tell you I'm pretty noob in this "universe". I'm using: ExpressJs, MySql, Body-Parser, Express-session, Ejs template for creating an Basic Contacts Application in Node. My database is composed from 3 tables: user (user_id,…
dem.1797
  • 37
  • 6
-1
votes
1 answer

How to use express sessions over CORS requests

I am trying to keep sessions on my nodejs backend after a user logs in. The client is an app, and the login is done via an ajax request. I want to know if this is at all possible.
Andre Marques
  • 371
  • 1
  • 2
  • 12
-1
votes
1 answer

how to retrieve the nodejs session values in a html page using angularjs?

I'am using express-session for creating session in nodejs & using http.post method to send datas to nodejs. How to retrieve the session variable in html using angularjs? Can you please help me? Here is my code Inside angularjs controller in the…
-1
votes
1 answer

Logout doesn't clear the session, session.destroy doesn't works

I am developing an express application and i need to implement login and logout. I have created a session using the following code during login. req.session.login_id = rows[0][0]["login_id"]; req.session.save(function(err) { if(err){ …
Mathew John
  • 439
  • 6
  • 13
-1
votes
1 answer

In express when reading cookies, it returns an empty object as {}

I'm trying to set cookie using res.cookie or res.append('Set-Cookie',...) on express.js, but when I use req.cookies, it return {}(which is the default value of res.cookies). I've searched many web pages but it still can't return the right value. PS:…
Tony
  • 1
  • 4
-2
votes
1 answer

How can I set the domain attribute in express-session based on the request origin?

I'm using express session. I set the domain domain: 'mydomain.com' so that the session cookie can be set between subdomains- like api.mydomain.com and staging.mydomain.com. But this prevents the Set-Cookie header from setting the cookie when testing…
1 2 3
62
63