Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

Node.JS - Why is the cookies / session missing sometimes after the payment gateway

I am doing a webiste using Node.JS and it including a payment features where it will post form submission using javascript from ejs file, and then being redirect to the payment gateway.After the ...
Terry Ng's user avatar
0 votes
1 answer
63 views

Session id undefined express

I am having trouble identifying why exactly my session id is not being set in my expressjs backend api. When I run Postman via a post request to /provision: const express = require("express")...
Daniel's user avatar
  • 15.1k
0 votes
0 answers
24 views

Expressjs session cookie is not being set in react client

For some reason when I login it doesn't set cookie session for client to access content Expressjs app setup: const app = express(); app.use(express.urlencoded({ extended: false })); app.use(express....
Saifujjaman Abir's user avatar
0 votes
1 answer
202 views

cookie-session: req.session is null but cookies are not removed from browser

According to cookie-session docs Destroying a session can be done with req.session = null In my Nestjs application I get the session (using the session decorator) and assign a userId property to it. ...
JustinD's user avatar
  • 25
0 votes
0 answers
36 views

Unable to set cookie in cross-domain environment using Express cookie-session and passportjs GitHub OAuth2

I have an app with react frontend and express backend implementing passport.js GitHub OAuth2 + cookie-session workflow. The res.on("close") listener recorded that while in development with ...
Nia_H's user avatar
  • 1
0 votes
0 answers
247 views

How can I declare session types with cookie-session?

I am trying to migrate from express-session to cookie-session because I want client-side sessions. For express session I would just simply write on app.ts: declare module 'express-session' { ...
Diego Rosselot's user avatar
0 votes
0 answers
64 views

No session Cookie received in Redis Cluster setup ... issues on Kubernetes setup

I am working on an Express.js server that interfaces with a Redis store for session management. In my development environment, the session cookie is being set and sent to the client as expected. ...
Alex793x's user avatar
3 votes
1 answer
117 views

Client not receiving session data from server using Node, Passport JS, and cookie-session

so i've been using development servers this entire time, and everything's worked fine. Now, as I've deployed my client and backend, i'm running into an issue where my client cannot grab the sessional ...
sweglord's user avatar
0 votes
1 answer
196 views

Resetting cookie-session expiry time

I am trying to set the expiry time of cookie-session dynamically based on the value pulled from the database. For some users the value might be less or more than other user. When the server ...
goxarad784's user avatar
1 vote
0 answers
96 views

How can I handle 'Session Trampling' error while authenticating multiple sessions in the same browser with node-oidc-provider?

When we try to open multiple browser instances and try to login with same user credentials, we get different kinds of errors. The very first browser session is loaded fine but the further sessions ...
Nivedita Pandey's user avatar
0 votes
1 answer
227 views

Django doesn't set cookie and doesn't create session

I have a problem setting cookies in Django. Basically I have 3 different cookie I wanna set: Session ID Access token Refresh token For some reason Access and Refresh tokens are set, but the Session ...
Vladislav Mikhailov's user avatar
0 votes
1 answer
312 views

My Web App Keeps Logging Me Out Node.js Express.js express-session

My website keeps logging me out when I try to access other pages when logged in. I am using cookies to store the session but, I guess I did not do it properly cause even after authentication, I am ...
Bhoami Khona's user avatar
0 votes
1 answer
152 views

Sometimes "cookie-session" cookies cannot be modified any more

I have a NodeJs Express server where I use the cookie-session module to keep a simple session in a browser cookie. All works fine, except that sometimes (once every few weeks on my dev machine), I ...
Will59's user avatar
  • 1,684
1 vote
0 answers
134 views

cookie-session, socket.io fails to store socket.id in sessions

server.js const express = require("express"); const cookieSession = require("cookie-session"); const socketIo = require("socket.io"); const app = express(); app.use( ...
Данияр Булдаков's user avatar
0 votes
1 answer
340 views

Unable to use session cookie in server-side request (getServerSideProps) in Next.js

I'm trying to perform a request to a backend service using Axios inside getServerSideProps, but it is failing because the session cookie that is needed for authentication is not included in context....
mspaul2388's user avatar
0 votes
1 answer
47 views

node express cookieSession cookies not being set

A node express api for SPA with the following: const express = require ('express'); const bodyParser = require ('body-parser'); const cookieSession = require ('cookie-session'); const cors = require ('...
minisaurus's user avatar
  • 1,166
1 vote
0 answers
140 views

express req.session not populated

I have an express app where I'm using cookie-session for storing jwt token. I'm using supertest to test that app. So, here is what I'm trying to achieve: Here a cookie is created and jwt is stored ...
Dimitar Georgiev's user avatar
0 votes
1 answer
3k views

How do you see the contents of Cookies in Use on Android Chrome?

Ive been searching for the past 2 hours and all the results are just blocking and clearing cookies and I DONT want that. I want to view the contents of Cookies like this image here but on Android ...
Ello mates's user avatar
1 vote
1 answer
52 views

How to delete cookie-session?

This is my code: var express = require('express') var sessionCookie = require('cookie-session') var app = express(); app.use(sessionCookie({ keys: ['abc'], name: 'user' })); app.get('/', function (...
Hojat's user avatar
  • 41
1 vote
0 answers
249 views

Check if express cookie-session has expired using passport isAuthenticated

I'm using express cookie-session: http://expressjs.com/en/resources/middleware/cookie-session.html I can not find the answer to this and based on some logging there is no way to see the time elapsed. ...
me-me's user avatar
  • 5,659
0 votes
0 answers
62 views

req.session created by cookie-session middleware of express is not accessable in other subroute

session package of npm for implementing authorization and authentication in app.js(nodejs) statement is written like app.use(cookieSession({ name: 'wrtpsess', keys: ["dsfewfsffe3243efds"]...
Yash Mathur's user avatar
2 votes
0 answers
389 views

Why cookie-session is not saving a cookie?

I am using cookie-session to check the id of an user: const cookieSessionMiddleware = cookieSession({ // secret: secretcookie.cookieSecret, secret: "dont look here, it will be a secret&...
Gabriel Chamorro Moris's user avatar
0 votes
1 answer
363 views

How to properly configure csurf with cookie-session in express?

I'm trying to setup csrf protection using cookie-session as the csurf docs mention it explicitly, but loading my /form page returns a 500 and 'misconfigured csrf' is logged to the console. import csrf ...
amadesclaire's user avatar
1 vote
1 answer
916 views

req.cookies undefined express js cookie-session

Req.cookies is undefined whilst req.headers.cookie contains the cookies, I am using cookie-session and express. I am declaring cookie-session before the routes. For refrence I grabbed my code from ...
Eliasd's user avatar
  • 31
0 votes
2 answers
2k views

When I use Express cookie-session, is it enough to delete the cookie client-side in order to logout?

I'm using Express cookie-session for authentication, which, if I understand correctly, works by storing a cookie locally in the browser of the user and no session data client-side. The documentation ...
Florian Walther's user avatar
4 votes
0 answers
665 views

express cookie-session failing on mobile

I am trying to use cookie-session in express / nodejs, my setup works on PCs, but not on mobile: on Android/Firefox, I can setup the session cookie, but I cannot modify it once set, I can't event ...
Will59's user avatar
  • 1,684
0 votes
1 answer
565 views

How do I set cookie values dynamically in "HTTP CookiesManager" i.e. ai_user & ai_session for incoming user in ecommerce site in JMeter?

I want to set user defined cookies value i.e. ai_user & ai_session dynamically for each user in "HTTP CookiesManager" in JMeter, as it happens in browser ecommerce website. It's hard ...
Areeba Rafi's user avatar
0 votes
1 answer
2k views

Express module cookie-session not including SameSite and Secure in Response Set-Cookie

Seen this before here, but I've seen no real resolution. The server's Node Express express-session module OR cookie-session module sends back a Session Cookie, but as I had not coded in the SameSite/...
Ric's user avatar
  • 796
0 votes
1 answer
536 views

How we can get cookies of web App through inspect and import them to JMeter so we can pass some dynamic values to other APIs?

I want to know how we can get Cookies of specific website home page from browser through inspect element, and then pass cookie data to other APIs as dynamic variable in jmeter.
Areeba Rafi's user avatar
1 vote
1 answer
1k views

Express signed cookie vs JWT as cookie for Authentication

First let me start by saying, this is not a question of client token vs server-side session reference. I understand the differences and I've already decided on a session-less implementation. I've ...
paultman's user avatar
  • 425
2 votes
0 answers
239 views

What's the difference between cookie-session and JWT tokens?

This library here stores your session data on the client https://www.npmjs.com/package/cookie-session. But doesn't that make it a JWT token (as opposed to a "session")? Is the difference ...
David McNamee's user avatar
1 vote
0 answers
162 views

Setting session data in cookie using cookie-session npm library

Description I'm currently trying to implement some session authentication logic in my node backend, but having issues in my development environment that I can't seem to troubleshoot. Backend: node ...
David DeStefano's user avatar
0 votes
2 answers
3k views

Express cookie-session not saving cookie when SameSite is set to 'none' and secure is set to true

I am using cookie-session and passportjs to authenticate users in my express app. When I initialize my cookieSession like this: app.use(cookieSession({ maxAge: 24 * 60 * 60 * 1000, keys: ['...
Andrew's user avatar
  • 250
0 votes
2 answers
946 views

Generate unique sessionId with Express Cookie-Session

I'm using node/express.js with cookie-session in my application. Currently, when a user logs in a cookie is stored in their browser with a value, for example: session: ABC123. If the user logs out, ...
Sajjan Karn's user avatar
1 vote
0 answers
64 views

session is getting expired after closing browser in express.js

I used both cookie-session and express-session, I also specified maxAge but still, it's no use. const expressSession = require("cookie-session"); const IN_PROD = process.env.NODE_ENV === &...
SAURABH DHAKNE's user avatar
2 votes
1 answer
865 views

Isn't cookie-session in express essentialy the same as JWT tokens?

In the express documentation a distinction is made between express-session and cookie-session. There it says: A user session can be stored in two main ways with cookies: on the server or on the ...
symlon's user avatar
  • 35
0 votes
3 answers
4k views

How to create a cookie with node cookie-session

I am running a small node app. And I am trying to get it to create a cookie for each visitor, called 'session' that contains - for example - the session id. But I cannot seem to get node to create a ...
jlanssie's user avatar
  • 127
0 votes
1 answer
242 views

React.js + Express on Node.js: What is the correct cookie setting for cross-site requests?

I just want to share cookie setup for cross site requests (FE hosted on Firebase, BE hosted on Heroku) that I wasn't able to find anywhere, just a piece of info there and a piece of info somewhere ...
honzza dvorak's user avatar
0 votes
1 answer
2k views

nodejs cookie-session typeerror

TypeError: this.keys.index is not a function the console log show that the if condition line is error app.get('/',(req,res)=>{ if(!req.session.authenticated){ res.redirect('/login'); ...
sean's user avatar
  • 1
0 votes
1 answer
484 views

I need that the last 3 searches are saved in a cookie and displayed

I want the last 3 searches to be saved in a Cookie and displayed in a '< p>' tag. Here is my HTML code: <form class="Dform" method="POST" action="index.php"&...
Adii's user avatar
  • 17
1 vote
0 answers
59 views

I lost all css when i set cookies expire

I lost all css when i set cookies expire = 0. My website still work fine when compile it in local. But when i deploy it to public server, all css can't loaded. cookies.set("token", res.data....
thaovd1712's user avatar
1 vote
1 answer
2k views

Express cookie-session not creating cookie on client side

I have a simple ExpressJS app that is using cookie-session to create a cookie. I have a few routes defined but none are returning a cookie. The documentation for cookie-session says that req.session ...
user3809888's user avatar
1 vote
0 answers
291 views

Remove httponly from cookie when making HTTP call using Flutter

I have an Express application that has a cookie-based authenticated route. I am using cookie-session to store auth tokens in the cookie. I am developing a mobile app using Flutter and am using the ...
Nikhil Baliga's user avatar
1 vote
2 answers
2k views

What is "cookie-parser" middleware?

While creating back-end apps with express.js, I have used express-session and cookie-session. But, recently I found out this cookie-parser package on npm. It's pretty popular. My question is, What is ...
Rahul Dahal's user avatar
1 vote
2 answers
2k views

Expressjs cookie-session settings not working with Passportjs

I'm trying to call my /auth/user endpoint to get the current user that's logged into my website. But because of the new Chrome update I need to somehow set 'sameSite' and 'secure'. Anyone know of how ...
Stevens Qiu's user avatar
2 votes
2 answers
606 views

How to initiate session on signup with cookie-session and passport.js?

I have a /register router for signing up a user. I am using cookie-session (which is similar) instead of express-session for simplicity for now. I am stuck on the part where I need to authenticate a ...
Anand Goswami's user avatar
5 votes
2 answers
6k views

Why use cookie-session in addition to passport.js?

My understanding of passport.js so far is that passport.js serializes the user object and sends an ID every time to the client. I am just starting with it so sorry if it's a silly question: Instead of ...
fsljfke's user avatar
  • 461
0 votes
0 answers
43 views

Why is the web browser not setting my cookie?

I am using the cookie-session package. app.use( cookieSession({ signed: false, secure: false }) ); When a user signs up, I set the session property to an object. req.session = { jwt: ...
Hugo Javadi-Babreh's user avatar
1 vote
0 answers
264 views

Set user info with cookie-session

I'm using cookie-session to store all my session information. After my users login, I store his information inside req.session.user like this req.session.user = _.omit(client.dataValues, [ "...
lufizi's user avatar
  • 403
0 votes
1 answer
160 views

How is 'req.session' change detected in cookie-session middleware?

From the Readme.md file, it says, The middleware will automatically add a Set-Cookie header to the response if the contents of req.session were altered. Where is the implementation of detecting req....
Sabbiu Shah's user avatar
  • 1,689