I have a React App making calls to an API in node.js/Express.
Frontend is deployed in Netlify (https), Backend deployed on Heroku (https).
My problem:
Everything working in dev environment (localhost)
In production (Netlify/Heroku), the api calls…
I am a beginner in NodeJS. I was working on a simple session-based user authorization to get a taste and it is working perfectly fine as there are plenty of examples around the internet which are easy to understand. I used express-session and the…
Fellow web developer here. I seem to be running into this problem (that didn't occur until recently) where the cookie Session ID gets changed on every API request.
Edit Confirms to work in IE11 & Edge!? Not Chome?! WTF! Doesn't work with fetch and…
I am trying to implement simple authentication with Node, Express, Express-Session and Passport.js. As a storage middleware I'm using connect-pg-simple as I am using pg-promise in my project.
I managed to configure passport to work with my routers…
I'm trying to use mssql-session-store as nodejs (express) store for session:
https://www.npmjs.com/package/mssql-session-store
This is how it should be configured(from npm page):
app.use(session({
secret: 'keyboard cat',
resave:…
I am in the middle of decoupling my frontend from my backend repo. In doing so I am hosting my server on a personal Raspberry Pi 3 on my home network. My frontend is hosted by Netlify.
I have run into a problem where I am not able to set cookies on…
Following this example in Nextjs repository, I want to implement the CSRF protection (perhaps with csurf package), because I'm using a session ID cookie with express-session.
I tried setting csurf in my custom server and save the generated token in…
I have an extremely small express app to illustrate a problem I'm having.
I'm using connect-redis as a session store on my express app. I'm having a problem simply connecting to it though. Simply printing out req.session.store results in undefined…
I am trying to make Express session work with Next.js, and have successfully done so on the client side, but I am having trouble with API calls made from inside getInitialProps.
Note: I am using isomorphic-unfetch to make API calls. My Next.js…
I have an application using Angular and Node (Nest JS) , in the server side i'm using express-session.
In my middleware i'm adding the logged in user to the session:
req.session.user = user;
When the user tries to login using an Iphone he is not…
Yesterday, I tried to make a website, using Node.js and the framework Express.js. On this website, the user needs to log, with credentials, who are checked in database. If the credentials are correct, I want to save the user's informations in a…
I am currently using express and express-session to save information. If I save a session variable like this in file 'routes/login.js'
req.session.user = "User1"
How do I then access that same variable from 'routes/index.js' because currently if I…
I am using express-session and I need to create a session secret.
I have read that the secret is used for hashing.
How long and what characters should this secret have?
I was thinking about a random alphanumerical string like this:…
i am building a site that as two url ('/','/admin') session are conflicting
here is my app.js session code
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
app.use(cookieParser());
…