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.3.0 to 0.3.1

lib/errors/expiredstateerror.js

2

lib/index.js

@@ -8,1 +8,3 @@ exports.Manager = require('./manager');

exports.clean = require('./middleware/clean');
exports.ExpiredStateError = require('./errors/expiredstateerror');

10

lib/middleware/resumeError.js

@@ -1,4 +0,4 @@

var SessionStore = require('../stores/session');
var SessionStore = require('../stores/session');
var ExpiredStateError = require('../errors/expiredstateerror');
module.exports = function(flows, store, options) {

@@ -31,3 +31,7 @@ options = options || {};

}
// Don't try and load the previous state if it's antecedent removal was the cause
// of the error that led to this processing in the first place.
if (err instanceof ExpiredStateError && err.state.handle === state.prev) { return next(err); };
var yieldState = state;

@@ -34,0 +38,0 @@ store.load(req, state.prev, function(ierr, state) {

var uid = require('uid-safe').sync;
var clone = require('clone');
var ExpiredStateError = require('../errors/expiredstateerror');

@@ -48,3 +49,3 @@ function SessionStore(options) {

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

@@ -51,0 +52,0 @@ this.destroy(req, h, function(){});

{
"name": "flowstate",
"version": "0.3.0",
"version": "0.3.1",
"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