I have a problem with express session, connect-mongo and Amazon Beanstalk.
Each time that Amazon Beanstalk wants to check health, It's doing a request to API but it creates a new document in mongodb database.
So, in a short time Amazon creates…
I'm using express-session along with passport and MongoStore to store my sessions. They're obviously being stored in the MongoDB, how can I access them just to take a look at? There's no business value in this it's just from a theoretical/technical…
I am having an issue accessing a saved req.session object. It seems that it is accessing a new req.session with a new api call.
This is my server.js
const logger = require('morgan');
const express = require('express');
const bodyParser =…
I have inherited a Express site which needs some updating. There is a route for resetting password, but I need to invalidate all the users sessions when this happen and allow for auto login on the current browser at the same time.
I'm kinda new to…
I set up the session maxAge of express like documented.
Here is my code:
app.use(session({
secret: process.env.SESSION_SECRET,
saveUninitialized: true,
resave: true,
maxAge: 1000* 60 * 60 *24 * 365,
store: new…
I have a Node/Express application that use redis as session store.
I have a question concerning the handling of the expiry of the session.
I'd like have an active session until the browser is closed, so I didn't set a session expiration time.
Doing…
I have implemented the OAUth 2.0 flow as single authentication method for my express application.
In real situation, once a user connected using OAuth, a session is created and accessible server-side in req.session.passport.
In this session, there…
I am stumped as to when I set the cookie to secure, the csrf of node is not working.
//Load Cooike Parser
app.use(cookieParser(secret));
//Load Session Store
app.use(require('express-session')({
secret:secret,
cookie:{
maxAge: 1000 *…
I'm trying to implement authentication and sessions with socket.io.
After a lot of research 1, I've set up the following which makes use of express and express-session.
The issue is that, express and socket.io connections seems to be having…
Hello all i am making an android app in whiich i have multiple account login at a time now my question is that i for multiple logins i should use sessions to verify every account user that is logged in. Now i am using express on the server side i…
So I've set the session according to the documentation for express-session, as far as I can tell. But my cookie is not getting created! According to the documentation, all you have to do is set the request.session value and the cookie should…
I am trying to build a session-based authentication for my web app. I have the following auth function:
function authenticate(req, res) {
var body = req.body;
getAuthUser(body.username, function (err, result) {
if (hash(body.password) !=…
I'm building an authentication app using the PEAN stack (i.e., PostgreSQL - ExpressJS - Angular - NodeJS). For authentication, I'm using express-session on the backend. Authentication on backend works 100% correctly.
Problem
I have a problem…
im using express-session to store signin info in the most simple of ways:
req.session.userId = user.id
i use this configuration for both dev environment in which everything works perfectly, and specs:
app.use(express.json())
app.use(sessions({
…