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…
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…
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…
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 trying to destroy the cookie on the client side but can't seem to figure out how to. I've tried the few ways that passport and some answers on SO provided but I'm at a loss as to how to clear the actual cookie.
My code so far…
//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…
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…
The session of my nodejs app is expiring every time I refresh the page, after login. It does work fine if I visit different pages but as soon as I refresh the page, the session ends. I've tried a couple of things but none of it seems to work. How…
I am facing the issue : on every request new sessionID is getting created. Can someone throw light at this ?
Versions I am using:
NODE VERSION: v6.10.3
NPM VERSION: 3.10.10
express@4.15.3
express-session@1.15.3
Also what is the default value…
I am currently trying to implement session management using express 4.x and socket io 1.4, referencing this answer. The problem is that the second argument to the express session function is the res (response) object which is returning 'undefined'…
I am using Redis as session store and I would also like to create custom session id with express-session. So far I achieved was creating session with constant string like this:
redis configuration
var express = require('express');
var path =…
I have a NodeJS Express app that uses express-session. This works great, as long as session cookies are supported.
Unfortunately it also needs to work with a PhoneGap app that does not support cookies of any kind.
I am wondering: Is it possible to…
so what I want to do is to create a session and store it in redis.
I followed the API from this github repository https://github.com/tj/connect-redis.
But I am getting this error in the word client: The expected type comes from property 'client'…
I am getting error while trying to save session on mongodb. Here is my code..
const express = require("express");
const session = require("express-session");
const MongoStore = require("connect-mongo").default;
const app = express();
let…
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…