GithubHelp home page GithubHelp logo

encrypt cookies about cookie-session HOT 18 CLOSED

defunctzombie avatar defunctzombie commented on April 28, 2024 8
encrypt cookies

from cookie-session.

Comments (18)

ebourmalo avatar ebourmalo commented on April 28, 2024 7

I was also looking for this option and didn't find anything. I made a super-easy to use express middleware to achieve transparently cookie encryption / decryption: cookie-encrypter.

var app = express();
app.use(cookieParser(secretKey));
app.use(cookieEncrypter(secretKey));

Hope this helps

from cookie-session.

sankethkatta avatar sankethkatta commented on April 28, 2024 4

Mozilla has a package which does just this: mozilla/node-client-sessions

from cookie-session.

btxtiger avatar btxtiger commented on April 28, 2024 3

@ebourmalo did you get it working with cookie-session? It seems the session cookies were not caught by the middleware.

from cookie-session.

jonathanong avatar jonathanong commented on April 28, 2024 2

Meh I don't think it's really necessary. Makes it a little harder to debug. and at that point you might as well use a session store if you want to hide details from the user

from cookie-session.

nburoojy avatar nburoojy commented on April 28, 2024 2

FYI, I kind of hacked encryption onto this package. Let me know if you want me to clean up, test and merge my fork: https://github.com/civitaslearning/cookie-session.

from cookie-session.

defunctzombie avatar defunctzombie commented on April 28, 2024

Another module I will make then ;) security requirements are different for
different apps.
On May 6, 2014 11:39 PM, "Jonathan Ong" [email protected] wrote:

Meh I don't think it's really necessary. Makes it a little harder to
debug. and at that point you might as well use a session store if you want
to hide details from the user


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42394243
.

from cookie-session.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

Can this be done via an option?

from cookie-session.

jonathanong avatar jonathanong commented on April 28, 2024

i asked @jed if he wants to move his stuff here. i'm not sure if i do this in this repo, but in koa's session, i began base64 encoding the entire session anyways to avoid issues with cookies with ;s and stuff. i think base64 encoding cookies or encrypting them are good options for a cookies lib.

from cookie-session.

Fishrock123 avatar Fishrock123 commented on April 28, 2024

Re @defunctzombie: I would rather not have 2 libs for virtually the same thing.

from cookie-session.

defunctzombie avatar defunctzombie commented on April 28, 2024

I agree. I would prefer to stop using my older yummy module in favor of
this one. Maybe I will make a PR with encryption so we have something more
tangible to work with.
On May 7, 2014 11:53 AM, "Jeremiah Senkpiel" [email protected]
wrote:

Re @defunctzombie https://github.com/defunctzombie: I would rather not
have 2 libs for virtually the same thing.


Reply to this email directly or view it on GitHubhttps://github.com//issues/9#issuecomment-42467835
.

from cookie-session.

coen-hyde avatar coen-hyde commented on April 28, 2024

@nburoojy Can your encryption implementation be merged back into cookie-session?

from cookie-session.

gabeio avatar gabeio commented on April 28, 2024

@coen-hyde he said it was a fork so it should be possible...

from cookie-session.

dougwilson avatar dougwilson commented on April 28, 2024

Hi @sankethkatta , yep, and it's a 100% valid alternative! npm gives you a lot of choice :)

from cookie-session.

dougwilson avatar dougwilson commented on April 28, 2024

So apparently having stale issues is a sign of bad modules these days, who knew. This is still a desired feature that I plan to work on at some point, though anyone is welcome to make a PR as well. I'm going to close this issue, unfortunately, as just having it open down ranks the module.

from cookie-session.

sawyerh avatar sawyerh commented on April 28, 2024

@dougwilson Just confirming I'm not overlooking something: encryption support hasn't been added to cookie-session? Could this request be reopened if so?

from cookie-session.

dougwilson avatar dougwilson commented on April 28, 2024

It has not been added and as noted above I'm not going to reopen the issue, either, for those reasons. If you want to see it happen, the best thing to do is to put to together a pull request instead of us keeping an issue open indefinitely. Perhaps if someone committed to having a pull request made in a specific timeline I can open this issue. If you want to make that commitment, let me know and I can reopen.

from cookie-session.

btxtiger avatar btxtiger commented on April 28, 2024

@dougwilson
You can check out my node module, if it fits to your requirements.
https://github.com/btxtiger/encrypt-cookie

from cookie-session.

mircohacker avatar mircohacker commented on April 28, 2024

@dougwilson my PR for this feature is ready. Please have a look.

from cookie-session.

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.