Socket
Socket
Sign inDemoInstall

flowstate

Package Overview
Dependencies
4
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.0

2

lib/middleware/clean.js

@@ -35,3 +35,3 @@ var SessionStore = require('../stores/session');

} else if (ttl && age > ttl) {
store.destroy(req, state.handle, iter);
store.expire(req, state.handle, iter);
} else {

@@ -38,0 +38,0 @@ iter();

@@ -45,5 +45,8 @@ var uid = require('uid-safe').sync;

state.handle = h;
if (options.destroy === true) {
if (state.expired) {
this.destroy(req, h, function(){});
return cb(new Error('login process has timed out, please try again'));
} else if (options.destroy === true) {
this.destroy(req, h, function(){});
return cb(null, state);

@@ -96,3 +99,13 @@ } else {

SessionStore.prototype.expire = function(req, h, cb) {
var key = this._key;
if (!req.session || !req.session[key] || !req.session[key][h]) {
return cb();
}
module.exports = SessionStore;
req.session[key][h].expired = true;
return cb();
}
module.exports = SessionStore;
{
"name": "flowstate",
"version": "0.2.0",
"version": "0.3.0",
"description": "Stateful, transactional flows using page-based navigation.",

@@ -5,0 +5,0 @@ "author": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc