I'm trying to build a typeScript project but it has an error and I do not know where it comes from and nothing has changed since last time.
node_modules/connect-mongo/src/types.d.ts:113:66 - error TS2694: Namespace 'Express' has no exported member…
It is unclear what are the correct configuration parameters to use are in the situation of using Redis Cloud and Heroku, and can't find a functioning example online.
Here is my current code:
const express = require('express')
const session =…
I'm using node with the express-session and session-file-store packages. The session data is stored as files in the root directory, using the session-file-store package. However, now my logs are being clogged because the message…
I'm developing a user login/register feature as part of a larger project and am working on localhost (apollo server and react apollo front-end). I'm using express-session for my sessions.
When submitting my login I can see the response header has…
I have a GraphQl server and a react frontend. I use passport and LocalStrategy to authenticate the user which works well, I can successfully login an existing user. I also want to use passport session to create a user session, so that I can access…
When not using secure cookie true setting, my app user login works fine. When I enable secure cookies, the login appears to go through fine, but it seems the cookie is not saved and the user is not logged in.
In other words, this works:
app =…
Is there a built in feature in express session, to enable auto logout after given time of inactivity ? I am using it as below, and want it to logout if session is inactive for half an hour.
app.use(session({
key: 'sessid',
secret: 'This is…
//Initializing session
app.use(session({
secret: 'keyboard cat',
resave: true,
saveUninitialized: true
//cookie: { secure: true }
}));
I was creating a shopping cart and came across a problem , I was setting cart object in session…
My express-session is working, I tested it with a very short cookie max-age (10 secs) and it works as intended:
app.use(session({
secret: 'xxx',
resave: false,
saveUninitialized: true,
cookie: { secure: true, maxAge: 10000 }
}));
The…
I'm trying to use express-session and express-mysql-session within a Typescript project. Here's the relevant part of my code:
import * as express from "express";
import * as expressSession from "express-session";
import * as expressMySqlSession from…
I'm working on a Typescript project with npm packages. I want to add a property to the Express.Session interface.
example Class:
class User {
name: string;
email: string;
password: string;
}
export = User;
New d.ts file for the…
I have a Node.js, Angular app. (Node.js server written in TypeScript).
Node.js Server is running on an Amazon EC-2 instance, the Angular client is on another server.
For the login session, I use express-session. I am not using cookies in the app, so…
My app is divided between Client and Server. Client is a frontend side Nextjs app hosted on Now.sh, Server is its backend created with Express and hosted on Heroku, so the domains are client-app.now.sh and server-app.herokuapp.com…
I'm using passport, express-session and connect-pg-simple.
The problem is that session is not correctly obtained from a storage, where it gets properly (i hope, but doubt) saved.
My setup is the same, as in many tutorials, I've found…