Comments (18)
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.
Mozilla has a package which does just this: mozilla/node-client-sessions
from cookie-session.
@ebourmalo did you get it working with cookie-session? It seems the session cookies were not caught by the middleware.
from cookie-session.
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.
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.
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.
Can this be done via an option?
from cookie-session.
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.
Re @defunctzombie: I would rather not have 2 libs for virtually the same thing.
from cookie-session.
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.
@nburoojy Can your encryption implementation be merged back into cookie-session?
from cookie-session.
@coen-hyde he said it was a fork so it should be possible...
from cookie-session.
Hi @sankethkatta , yep, and it's a 100% valid alternative! npm
gives you a lot of choice :)
from cookie-session.
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.
@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.
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.
@dougwilson
You can check out my node module, if it fits to your requirements.
https://github.com/btxtiger/encrypt-cookie
from cookie-session.
@dougwilson my PR for this feature is ready. Please have a look.
from cookie-session.
Related Issues (20)
- Session does not get stored if keys is not an array HOT 3
- What am I doing wrong? [question] HOT 1
- Clearing session does not remove cookies HOT 8
- Generating unique session.sig after logout/login HOT 3
- Use cookie-session as non middleware HOT 2
- Not working with axios (chrome) but working with Postman HOT 10
- Document: Ambiguity in Signature Documentation HOT 4
- sameSite no longer defaults to 'None' when undefined HOT 4
- session cookie value is exceedingly long and fails Set-Cookie with invalid syntax HOT 2
- secureProxy option to be able to use with non-Express servers behind SSL proxy HOT 1
- Suggestion: a custom name instead of req.session HOT 2
- Update dependency from [email protected] to [email protected] HOT 3
- Is there a risk when someone modifies the userId in the cookie? HOT 2
- Session cookie not sent over from server when using Firefox HOT 4
- Problem using with passport 0.6.0: session.regenerate is not a function HOT 7
- flag Priority=High
- encrypt cookies
- The link to a list of browser cookie limits is dead
- Larger cookies with compression
- cookie options not being set
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookie-session.