Giter VIP home page Giter VIP logo

Comments (7)

seanmonstar avatar seanmonstar commented on June 3, 2024 1

If you want to make the cookie name and the property name on request
different, you can use both cookieName and requestKey options. Set
cookieName to whatever you want, and requestKey to 'session'.
On Nov 22, 2013 6:13 AM, "yalamber" [email protected] wrote:

Hello,
I have seen that we can set cookieName to anything we want in this
library.
and access it with req.cookieName now will this work with passportjs? can
we set req.session directly with this library?

I am trying to implement client-session to work with passportjs. What
would be the recommended configuration?


Reply to this email directly or view it on GitHubhttps://github.com//issues/70
.

from node-client-sessions.

yalamber avatar yalamber commented on June 3, 2024

Hello,
So if change requestKey to session it should work properly with pasport.js right?

from node-client-sessions.

seanmonstar avatar seanmonstar commented on June 3, 2024

I assume so, but I've never used passport. The name you pass for requestKey
is the name you will access on request.

If requestKey='session', it will be req.session.
If requestKey='foobar', it will be at req.foobar.

from node-client-sessions.

yalamber avatar yalamber commented on June 3, 2024

It seems like it won't work with passportjs. Default cookieSession middleware works whereas node-client-sessions does not work. Is this issue with node-client-session or passportjs?

from node-client-sessions.

yalamber avatar yalamber commented on June 3, 2024

does it relate to this issue #42 ?

from node-client-sessions.

yalamber avatar yalamber commented on June 3, 2024

I did following change in passportjs jaredhanson/passport#185
And it seems to work now. Should I be careful implementing this patch?

from node-client-sessions.

seanmonstar avatar seanmonstar commented on June 3, 2024

@yalamber yes, this would work better with passport if #42 were fixed. I'm working on that.

from node-client-sessions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.