1,261
questions
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 ...
-1
votes
0
answers
21
views
passportjs + googleoauth20 + express-session (valkey store optional) req.user undefined
I'm so tired i spent the whole day trying to fix it but no matter what i do it's not working all i get is undefined PLEASE PLEASE HELP!!!!
I Uploaded All The code On GitHub
https://github.com/Parag-47/...
0
votes
0
answers
16
views
Save session information in Postgres with cutom Session model for express
I want to use session for an express back-end authentication & authorization using express-session library. I also want to persist the session in Postgres with custom schema as defined in the ...
0
votes
0
answers
52
views
Duplicate Session Entry and Missing Session Support
I'm building a Discord bot dashboard API using NestJS, Passport, and TypeORM for session management. When a user attempts to log in through Discord, I encounter two errors:
[Nest] 19524 - 09.08.2024 ...
0
votes
0
answers
23
views
unable to access property saved in request object of express
I am a beginner to Typescript. while i was trying to save a property in req session object of express after decleration i was expexting it to reproduce the property in other function which is called ...
0
votes
1
answer
40
views
Express-session and JWT token disappearing across different ports in MERN stack
I am working on a MERN stack application with the following structure:
myReactApp
--/frontend (React app)
--/dashboard (React app)
--/backend (Express server)
I have implemented user authentication ...
0
votes
0
answers
30
views
Cannot read custom property - TS2339: Property 'user' does not exist on type 'Session & Partial<SessionData>'
I am trying to implement session-based authentication system with using Express.js + TypeScript.
I got the problem below in my console while I cannot see any errors in my code.
TSError: ⨯ Unable to ...
0
votes
0
answers
19
views
Not redirecting to login page after session destruction
I have a session which is having all the designated parameters like origin, credentials etc which is required to authorize the user to dashboard. Server is hosted on 3000 port and the Frontend is on ...
2
votes
1
answer
44
views
cannot connect mariadb using express-mysql-session
I am trying to set up express-session, and I want to use mariaDB as a storage option, as my website already uses mariaDB for other storage in the backend.
In the readme of express-mysql-session, it ...
0
votes
2
answers
32
views
`req.session.user` does not save
After user logs in, some information about the user is saved in req.session.user, like his id,username and role
But verifyUser middleware always returns status 401 because it thinks that req.session....
0
votes
0
answers
40
views
Express session is not saving data
I am trying to store information on my req.session object upon login and at a later time access this to verify if a user is logged in for middleware
I am aware there are several similar questions but ...
0
votes
1
answer
21
views
express-session does not persist session by cross site request
My client/server architecture:
Client (Frontend): Vue (Vite)
Server (Backend): Express.js
Currently i use only the http, because it's a develop enviornment.
For safe request purpose handling, i use ...
0
votes
0
answers
29
views
Express Session not persisting through redirect in production with RedisStore
I am building a web app that uses session storage for key user identifying variables. In development, I used the default express-session MemoryStore with no issues. After deploying my node.js backend ...
0
votes
1
answer
28
views
Why does clearing all sessions make my NestJS app unresponsive?
I have a NestJS app, with a special Admin route I want to be able to call to clear out all user sessions (for example: after we deploy a new version of the application so we can kick everyone out).
I ...
0
votes
1
answer
56
views
Setting Cookie to Secure in Production Breaks Authentication
I am using express-session for authentication in my Express application. Here is the code I have so far:
app.use(
session({
store: new RedisStore({ client: redis }),
secret: process.env....
0
votes
2
answers
65
views
I'm having trouble figuring out how to save session tokens
I'm not able to send an ID token to my server to establish a session in a Node,js web app with express-session.
I'm able to get the ID token from Firebase Auth after submitting a verification code, ...
0
votes
0
answers
30
views
Issue saving cookies while using express-sessions in MERN project
I am having a hard time saving the cookies on the client side of a MERN project. This is how the entry point of my server looks like:
const express = require('express');
const app = express();
const ...
0
votes
0
answers
18
views
Specifing between Json web tokens and express session for authentication
Between JSON Web Tokens and express session, which is the best?
I'm just getting started with node.js.
This is my method for creating a new user, so should I use express session or JWT to save the ...
0
votes
0
answers
28
views
Express-Session with MySQLStore not persisting sessions in MySQL database
I am using express-session and express-mysql-session to manage sessions in my Node.js application with a MySQL database. While the session store initializes successfully and a sessions table is ...
0
votes
2
answers
31
views
Can RedisJson be used to store express-session data instead of Redis
I am trying to manually access the express-session data instead of using req.session.reload() and req.session.save(). I want to use Redisjson instead of default redis. I have the issue of the express-...
0
votes
0
answers
59
views
How to fix Invalid module name in augmentation error for express-session
I am trying to deploy my node application in Render web hosting. But each time the deployment process start, I get this error that says
error Command failed with exit code 2.
info Visit https://...
0
votes
0
answers
21
views
Session not showing in devTools despite being saved in mongo and logged in middleware
Trying to set a session in a react app with the use of express and express-session and all the MongoDB session tools.
I've tried many approaches even moving the way how I'm setting the middleware for ...
0
votes
0
answers
32
views
Express session's req.session undefined when a session should be established
Server logs:
Signing in
Signin successful 224152 0
Authenticating session...
No session established
I sign in, session exists in api/signin, i check session in Home.jsx and session is undefined ...
0
votes
0
answers
21
views
Express-session creates new session every request on prod only and it works fine on dev
I am working on ecommerce site where I want to save carts for all visitors using the session id generated with express-session. On dev mode it works perfectly but on prod the session id get ...
0
votes
1
answer
36
views
Express request does not inlcude user after passport (local strategy) authentication
Question: I try to authenticate http requests via username and password. The authentication seems to work. But for some reason the user data is not available inside the express routes. Related ...
0
votes
1
answer
57
views
Fetch not sending cookies across domains with NextJS
I have an app with a NextJS (app router) frontend and ExpressJS backend. I'm using express sessions for authentication. The issue I'm facing is that when I check authentication status from a frontend ...
0
votes
0
answers
16
views
Express-session session undefined (express on localhost:3000 client on liveserver)
I am running the server no localhost:3000 and the client on liveserver (127.0.0.1:5500).
When i login it creates a express-session (it returns session created successfully) but when i try to access it ...
0
votes
1
answer
77
views
Express session cookie not getting sent to the front end if I am setting secure=true in expression session
I am trying to set a cookie to store session using express-session.
I am sending requests over HTTPS.
app.use(session({
secret: env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
...
0
votes
1
answer
32
views
Passport JS and express-session: req.isAuthenticated() false in production , returns true in development
I am responding to request from client for protected resources based on whether the req.isAuthenticated() flag returns true or false
I am hosting my app on render
When i had completed the initial ...
0
votes
0
answers
27
views
Error: Typescript graphql-http context setting for express & express-session
I am trying to create a GraphQL server with express using typescript using graphql-http package. No other package i want to use like Apollo-server, etc.
The issue is whenever i an trying to set the ...
0
votes
1
answer
29
views
How to make session variables pass between pages?
To start off, I have multiple webpages in express. I save a variable into a session in a post request, then it redirects to a different page. On that page, I attempt to access the variable. But it ...
0
votes
0
answers
61
views
How to save sessionID and use it in socket, using express and express-session
Im trying to make a site where multiple users are able to draw at the same time, but one of my challenges is trying to store cookies and session Ids. So basically, when a user connects, theyre given ...
0
votes
1
answer
31
views
The user registers he's authenticated but cant get to the secret page so it redirects me to the login always
I do not actually know where the problem is but what i think is in either the secrets route or register route.
I want in that if the user registers the cookie is saved with the session id and the user ...
0
votes
0
answers
24
views
Session with MongoDB Store not persisting after redirect
I'm using express-session on the backend using MongoDB store. I can see the session is being stored in the db. Session variable holds the value until I redirect. After the redirect even tho the value ...
0
votes
0
answers
22
views
Issue with with implementing express-session authentication with React Context and useReducer
I'm currently working on implementing authentication using express-session on the backend and React Context with useReducer on the frontend. The authentication itself is functioning properly, as I'm ...
1
vote
0
answers
74
views
express-session not persisting when deployed in vercel
I'm using express-session and MemoryStore while deploying on Vercel. Although it generates an authentication cookie and sets it in the client, upon sending another request or refreshing, it redirects ...
0
votes
2
answers
188
views
NestJS + express-session + redis-connect implementation issue
I'm trying to implement express-session package along with connect-redis for session storage in my NestJS backend, but i got such an error as follows. I even changed the client inside the store to ...
0
votes
0
answers
18
views
"Remember Me" functionality usng PassportJS with express-session and connect-redis not working on browser restart
passport.use(
'local',
new LocalStrategy(
strategyOptions,
async (
req: Request,
email: string,
password: string,
done: (error: any, user?: any, options?: ...
0
votes
0
answers
39
views
Session doesn't show value on changing routes
Express session doesn't show value on changing routes. Here in '/login' route it shows req.session.user data, but in '/connect' it shows req.session.user is undefined
Here is the code
import express ...
1
vote
1
answer
132
views
How to use pool for redis connection with express-session and connect-redis
I am having some problems with sockets. I'm using express-session to manage session and it is storing session on redis.
I want to use pool for connections of redis. Express session uses RedisStore and ...
0
votes
0
answers
60
views
Unable to access session data in Express using express-session
I have implemented user authentication in my Node.js application using express-session and connect-session-sequelize to manage sessions and store session data in my MySQL database. Upon successful ...
0
votes
1
answer
81
views
express-session issue with cookies
I am building an app using express.js and vue 3, and I am using session based auth, it is working great on local.
However it is not working in production. here is my code for configuring the session ...
0
votes
0
answers
38
views
Not getting Passport session on production, but the same code works fine in local host
i am using passportjs for google authentication it is working fine in localhost but when i host it on render it is not returning the session, it only returns the empty cookie on the production but in ...
0
votes
0
answers
26
views
Why saveUninitialized is set to FALSE but the session still saved into database?
I'm new to nodejs and express-session. As far as i know, when saveUninitialized is set to FALSE, the uninitialized session cookie will not be saved into sessionStore (mongodb in my case). Here is my ...
0
votes
0
answers
24
views
why I am getting mongo connection error when trying to implement express - sessions
I am using typescript, MongoDB database, and express JS. I am trying to implement the express session. I am using connect-mongo to store my session.
This is the error am getting: const ...
0
votes
0
answers
22
views
I'm having problems with client-side session creation, the browser doesn't save the session ID
Context: In the API I am working with express-session in NodeJS to create the sessions, I am just testing, therefore the sessions are stored in memory on the API side, I am using two different domains ...
0
votes
0
answers
26
views
Server side conditional rendering based on session data
I'm trying to display to the user menu items 'Account' and 'Log-out' instead of 'Log-in' and 'Sign-up' after he loggs in.
I have set up express-session currectly and when the user loggs in I set:
...
0
votes
0
answers
23
views
How to set cookies at client side from the server response using express.js?
I am using express 4.18, express-session 1.18. Intends to set cookies at the client side (i.e. browser) via using a login controller(following code). In between, i am also using a middleware before ...
1
vote
0
answers
46
views
Why is my express session variable undefined?
We have an Express application with authentication routes (postLogin and getLogin) and session configuration set up using express-session. Despite configuring sessions, I encounter an issue where ...
0
votes
0
answers
283
views
express-session: connection.sid cookie validation
Recently we have discovered a auth vulnerability in our app becuause of the use of the express-session package.
Long story short, express-session uses the cookie connection.sid to manage its session ...