php - Using a symfony generated session as an express session? -
inside php/symfony using redis sessions generate user session.
inside node.js want pull in session session store.
var redissessionclient = redis.createclient({host:'redis://127.0.0.1/0'}); var sessionstore = new redisstore({prefix: 'my_session', client: redissessionclient}); app.use(session({ resave: false, saveuninitialized: true, secret: secrets.sessionsecret, store: sessionstore }));
now inside route can inspect req.headers.cookie
, session id looking @ cookie.
but want authenticate users on routes, need @ req.session
see if matches, express not giving me redis session information though passed in express-session
redisstore
var session = require('express-session'); var redisstore = connectredis(session);
so want check if user using node.js features authenticated core system built on symfony.
edit
so see 2 cookies generated 1 connect.sid
, 1 phpsessid
console.log(req.session)
returns connect.sid
Comments
Post a Comment