Code Monkey home page Code Monkey logo

koa-session-minimal's People

Contributors

dependabot[bot] avatar lzztt avatar natesilva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

koa-session-minimal's Issues

cicyle dependecies

when i use koa-generic-session-mongo with koa-session-minimal in koa2, it tell me cicyle dependecies
image
this is my app.js:
image
and i just get a user from mongodb , and set it to session.user:
image
my node version is 7.2.1,and i use it with --harmony to handle async function.

Consider migrating to `fast-deep-equal`

deep-equal is not only 2 orders of magnitude slower than fast-deep-equal, but it's by far the biggest dependency tree limbs in the project containing polyfills that haven't been needed for browsers or Node since 2015 (and your package.json denotes "node": ">= 14"). At 38M weekly downloads, it is not a small project either. Swapping dependencies to fast-deep-equal could save consumers kilobytes and reap a performance benefit. Transitive dependencies would go from 53 to 4.

'secure' cookie option

any reason you provided a default for the 'secure' option? the cookies module dynamic default seems more intuitive than your hardcoding of false

cant delete session

image

although i set session to null in a setTimeout, and terminal also show it is null, but when i call getPin int the second, the ctx.session.pin has a value

image

my enviroment: macos, node 7.2.0, koa-session-minimal-3.0.2, koa-generic-session-mongo-0.3.0

Session lost on node restart

First of all: great session middleware - it works really well as a drop-in replacement for koa-generic-session. Thanks!

I am using this in conjunction with the redisStore and, whenever node restarts, the session is lost.

The secret option is a fixed string - so I'm not so sure why this is happening.

Just putting it out there in case it's not just me. ๐Ÿ˜„

Additional validation support

Hi, I'm trying to figure out if it'll be possible to implement some additional session validation mechanisms (to help guard against session hijacking). Currently, I don't see anywhere where ctx can be obtained by the session store from koa-session-minimal; this is something that'd be necessary for my purposes.

Is there any way that this could be implemented or hooked in? Possibly an optional Promise call for stores? A new option that takes a fn that returns a promise and gets passed the ctx and session?

Typescript typings

Hey thanks for lib as koa-generic is a bit outdated, btw using this with Postgres is same with this lib + koa-pg-session? Or anything else recommended?

Also main question any possibilites for typescript 2 typings? Would be really awesome to use this with typescript

occur a waring

i use it with koa-generic-session-mongo like this:
app.use(session({
cookie: {maxAge: 1000 * 60 * 60 * 24 * 30},//30 days
store: new MongoStore()
}))

when i set: ctx.session.user = user , the shell tell me:
(node:12780) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'maxAge' of undefined

node version: 7.2.0

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.