hiddentao / koa-session-store

Session middleware for Koa with a pluggable storage layer
12 stars 2 forks source link

did not work #2

Closed Sunshine168 closed 7 years ago

Sunshine168 commented 7 years ago

hi i use in koa2 following

const session = require('koa-session-store');
app.use(convert(session({
    name: config.session.key, 
    secret: config.session.secret,
    resave: true, 
    saveUninitialized: false, 
     cookie: {
        maxAge: config.session.maxAge 
     },
    store: mongoStore.create({
         mongoose: mongoose.connection
    })
})));

in init koa2

And

 ctx.session.user = user ; // store in session 
console.log(ctx.session)// in my controller  ,show  {}

i check the cookies did not see the cookies for my application . i need help ~ thankful!!

Sunshine168 commented 7 years ago

well i got the problem ourrurs in my middlewares ~ may be after finding the problem update this issus

hiddentao commented 7 years ago

Glad to hear it.